Add  >>       or die( mysql_errno() ." : ". mysql_error() )          <<

It could be you don't have any data, also there's no space between /artist' 

Also trim off everything after 'artist' and see what you get. If it still 
doesn't work there's something wrong with the field names. Then start 
adding stuff back. BTW you don't need ORDER BY if you are LIMITing to 1. <g>


At 08:52 AM 1/18/2002 +1300, Barry Rumsey wrote:
>I can't figure out where I have gone wrong. Maybe not enough sleep, anyway 
>this is the simple query:
>$query = "SELECT * FROM xp_topics WHERE artist='artist'ORDER BY topicid 
>DESC LIMIT 0,1"; $result = mysql_db_query($query) or die("Select Failed!");
>echo("Latest Artists : $topictext <br>");
>It says query failed. I know I've forgoten something but don't know what

PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to