note 1523 modified in mysql_fetch_array by danbeck

From: Date: Thu, 07 Sep 2000 15:36:02 +0000
Subject: note 1523 modified in mysql_fetch_array by danbeck
Groups: php.notes 
Request: Send a blank email to php-notes+get-4382@lists.php.net to get a copy of this message
Note that mysql_fetch_* will not set any columns whose value is NULL. so, if you have a row with 10 columns, and 5 of them are NULL, then mysql_fetch_row/array will return 5-element array (mysql_fetch_array being a special case)! This is very misleading if you expect the number of elements in the array returned by mysql_fetch_row to always match the number of columns in your table. (Ed. Note: many people will vehemently argue that using NULLs in the first place is a bad idea.) http://www.php.net/manual/function.mysql-fetch-array.php

« previous php.notes (#4382) next »