note 10698 deleted from function.mysql-fetch-array by betz

From: Date: Wed, 05 Oct 2005 11:31:47 +0000
Subject: note 10698 deleted from function.mysql-fetch-array by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-96425@lists.php.net to get a copy of this message
Note Submitter: iblden at yahoo dot com ---- I also found that if the first record in my query contained NULL values in the cooresponding cells, "nothing" is saved to the variables being used in the loop. That is, the NULL value is stored in the variable used to present the column's value. If the first record contains NULL then (as mentioned in a previous post) as the loop continues, the variables associated with the next row will also be set to NULL. So, if your Select statement returns 79 records and the first record contains all NULL values, You will be presented with a "blank" table when you actually expect 79 records posted. hmmm. i think i represented that correcty. So how do i test for NULL values in this While loop ---> while ($row = mysql_fetch_array($sql_result)) { $first_name = $row["FirstName"]; $last_name = $row["LastName"]; $home_phone = $row["HomePhone"]; $email = $row["EmailName"]; ---------------- iblden.

« previous php.notes (#96425) next »