Re: very simple answer
| From: | Miles Thompson | Date: | Thu, 17 Jan 2002 20:48:03 +0000 |
| Subject: | Re: very simple answer | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-15949@lists.php.net to get a copy of this message | ||
Barry,
Add >> or die( mysql_errno() ." : ". mysql_error() ) <<It could be you don't have any data, also there's no space between /artist' and ORDER BY. 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> Miles 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