Re: very simple answer

From: Date: Thu, 17 Jan 2002 21:10:31 +0000
Subject: Re: very simple answer
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-15950@lists.php.net to get a copy of this message
I ended up rewriting it again and somewhere I must have done something wrong as it now works. Thanks guys. Maybe I should think about more sleep. ----- Original Message ----- From: "Miles Thompson" <milesthompson@ns.sympatico.ca> To: "Barry Rumsey" <webmaster@musicsearch.ath.cx>; <php-db@lists.php.net> Sent: Friday, January 18, 2002 9:48 AM Subject: Re: [PHP-DB] very simple answer > 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 > >

« previous php.db (#15950) next »