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" <[EMAIL PROTECTED]>
To: "Barry Rumsey" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
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
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
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