Muazzam Siddiqui wrote:

Hi,
I am getting the error

You have an error in your SQL syntax near 'select max(news_id) from news)' at line 1

while trying to run this query.

SELECT * FROM News where News_ID = (SELECT MAX(News_ID) FROM News);

You don't say what version of MySQL you are running. You probably do not have sub-selects. Consult your manual. Try : SELECT * FROM News ORDER BY News_ID DESC LIMIT 1;



The table type is INNODB. Is it some MySQL related problem because I know the query is right. I tested it on Access.

Thanks
Muazzam Siddiqui.

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963






-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to