note 21288 added to function.is-null
| From: | thepissboy at hotmail dot com | Date: | Tue, 07 May 2002 01:00:28 +0000 |
| Subject: | note 21288 added to function.is-null | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-30278@lists.php.net to get a copy of this message | ||
After pulling out most of my hair weeding through really unintelligible crap:
HERE'S AN EASY WAY TO ELIMINATE NULL VALUES FROM YOUR ARRAYS!!
$result = mysql_query("SELECT * FROM someDatabase WHERE page_title != ''",$db);
if ($myrow = mysql_fetch_array($result)) {
printf("%s\n", $myrow["page_title"]);
}
else {
printf("Scratch head");
}
It's all in the SQL Query line. The code says don't bring back anything that's
empty!!!!
So hopefully, some of us will be able to get back to being in a hurry.
--
http://www.php.net/manual/en/function.is-null.php
http://master.php.net/manage/user-notes.php?action=edit+21288
http://master.php.net/manage/user-notes.php?action=delete+21288
http://master.php.net/manage/user-notes.php?action=reject+21288