mysql_fetch_row/assoc return null instead of false

Recommend this page to a friend!

      PHP MySQL to MySQLi  >  All threads  >  mysql_fetch_row/assoc return null...  >  (Un) Subscribe thread alerts  
Subject:mysql_fetch_row/assoc return null...
Summary:mysql_fetch_row/assoc return null instead of false
Messages:1
Author:Jurgen
Date:2018-06-01 11:38:56
 

  1. mysql_fetch_row/assoc return null...   Reply   Report abuse  
Jurgen - 2018-06-01 11:38:56
hi,

In code that looks like this

while ((mysql_fetch_assoc($result)) !== FALSE) { .. }

we get endless loops, as the return value of mysqli_fetch_assoc is NULL and not FALSE


same goes for mysql_fetch_row and maybe others (did not check)

 

For more information send a message to info at phpclasses dot org.