note 33981 added to function.mysql-fetch-row
| From: | mysql at polyzing dot com | Date: | Sat, 12 Jul 2003 20:05:47 +0000 |
| Subject: | note 33981 added to function.mysql-fetch-row | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-51983@lists.php.net to get a copy of this message | ||
It is probably worth pointing out that the array elements will actually be of type string, OR NULL
if the field is null in the database.
Thus, either use a double equal comparison to look for empty or null
Or, use a triple equal comparison to be able to distinguish the two cases
e.g.
if ($field === '') echo "Empty, not NULL\n";
if ($field === NULL) echo "NULL\n";
if ($field == '') echo "Empty or NULL\n";
----
Manual Page -- http://www.php.net/manual/en/function.mysql-fetch-row.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33981
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33981&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33981&report=yes