Jump to content

ORDER BY not working!!!


hypnotic_monkey

Recommended Posts

$query="SELECT artist_id, genre, title, description, url, realName, memberName FROM mixes 
	LEFT JOIN members ON (ID_MEMBER = artist_id)";

                         $result=mysql_query($query);
                         $num = mysql_num_rows ($result);                         

                         while($row = mysql_fetch_array($result))
                        {
echo'';
                        }

WORKS FINE!!!! but when i change it to:

 

$query="SELECT artist_id, genre, title, description, url, realName, memberName FROM mixes ORDER BY mix_id DESC  
	LEFT JOIN members ON (ID_MEMBER = artist_id)";

                         $result=mysql_query($query);
                         $num = mysql_num_rows ($result);                         

                         while($row = mysql_fetch_array($result))
                        {
echo '';
                        }

 

I get this:

 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in...

 

its just that ORDER BY bit..... what have i done wrong?

Link to comment
https://forums.phpfreaks.com/topic/96352-order-by-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.