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

Popular posts from this blog

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -