Asheeown Posted June 21, 2007 Share Posted June 21, 2007 $Select = mysql_query("SELECT * FROM members WHERE id=(SELECT MAX(id) FROM members)") or die(mysql_error()); You have an error in your SQL syntax near 'SELECT MAX(id) FROM members)' at line 1 Please help, it's probably one simple mistake, but i've looked at it a hundred times and can't figure it out. Link to comment https://forums.phpfreaks.com/topic/56505-solved-subquery-quick-problem/ Share on other sites More sharing options...
teng84 Posted June 21, 2007 Share Posted June 21, 2007 $Select = mysql_query("SELECT * FROM members ORDER BY id desc limit 1") or die(mysql_error()); ASTIG!!! Link to comment https://forums.phpfreaks.com/topic/56505-solved-subquery-quick-problem/#findComment-279077 Share on other sites More sharing options...
Asheeown Posted June 21, 2007 Author Share Posted June 21, 2007 i love you, hahaha thanks dude Link to comment https://forums.phpfreaks.com/topic/56505-solved-subquery-quick-problem/#findComment-279079 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.