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. Quote 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!!! Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/56505-solved-subquery-quick-problem/#findComment-279079 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.