Mysqli - check if no result set

后端 未结 1 1793
谎友^
谎友^ 2021-01-27 10:42

In reference to Check if no result found in mysql db

It was previously thought that you could check to see if there as a record set returned by doing the following;

相关标签:
1条回答
  • 2021-01-27 11:02

    It doesn't look like you got zero results - it looks like your query failed (and therefore didn't return a mysqli_result).

    EDIT: To answer your question more specifically, yes it is as simple as

    if($result)
    
    0 讨论(0)
提交回复
热议问题