[thelist] mysql query syntax using max(id)
Anthony Baratta
Anthony at Baratta.com
Sat Oct 5 22:03:01 CDT 2002
At 07:42 PM 10/5/2002, George Fitzsimmons wrote:
>--
>[ Picked text/plain from multipart/alternative ]
>I can't seem to get the syntax right for this mySQL query:
>$query = "SELECT news_id, news_article FROM sb_news WHERE news_id =
>max(news_id) limit 1";
Here ya go....
SELECT Max(news_id) as news_id, news_article from sb_news
---
Anthony Baratta
President
Keyboard Jockeys
"Conformity is the refuge of the unimaginative."
More information about the thelist
mailing list