mysql - Strange behavior with mysqli::query -
i experiencing strange behavior mysqli::query function. attempting execute query , finding result evaluates true, when query ought returning false.
if($result = $mysqli-> query("select id,name,password
xxx
name
='$name' , password
='$password' limit 1")) { // end here }
i new mysqli shouldn't query return false on empty result set?
as query syntactically correct , dbms operates correctly - return result. 0 rows result set still result.
in case need check if 0 - incorrect credentials, 1 - correct
Comments
Post a Comment