Re: DESC & LIMIT
| From: | Ian Ferger | Date: | Tue, 08 Jan 2002 07:39:17 +0000 |
| Subject: | Re: DESC & LIMIT | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-15519@lists.php.net to get a copy of this message | ||
to use a desc, you need an order by
"Barry Rumsey" <webmaster@musicsearch.ath.cx> wrote in message
news:001001c197d6$ceb70160$0100a8c0@weizmain...
$query = "SELECT * FROM xp_sings,xp_artist,xp_songs WHERE
xp_artist.artist_id = xp_sings.artist_id AND xp_sings.song_id =
xp_songs.song_id AND song_name LIKE 'b%' DESC LIMIT 5";
$req = mysql_query($query);
$res = mysql_num_rows($req);
if ($res == 0)
{ echo "<center><b>Sorry there is no result.</b></center>";}
else
{ while($row = mysql_fetch_array($req))
{
extract($row);
It returns as "Sorry there is no result" but if I leave of the DESC and
limit , it works. Can someone tell me where I'm going wrong.