RE: [PHP] Re: Using PHP for NULLs
| From: | Jay Blanchard | Date: | Mon, 20 May 2002 11:50:12 +0000 |
| Subject: | RE: [PHP] Re: Using PHP for NULLs | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-98451@lists.php.net to get a copy of this message | ||
[snip]
I do believe it is a MySql question!!
What's wrong with the old standard way as:
$result = mysql_query("
SELECT *,
if (last_name is NULL,'zzz end',last_name) as last_name_sort
FROM new_miatapix
ORDER BY last_name_sort
LIMIT $page, 20");
$result = mysql_query("SELECT * FROM new_miatapix ORDER
BY last_name LIMIT $page, 20");
[/snip]
And then there is the very old standard;
SELECT *
FROM new_miatapix
ORDER BY last_name DESC
LIMIT $page 20
HTH!
Jay