adicrst Posted October 2, 2008 Share Posted October 2, 2008 According to W3schools to get the last record from a column i can use the LAST() function. Everything looks smooth until i test it using phpMyAdmin - 2.10.0.2MySQL client version: 4.1.15andphpMyAdmin - 2.11.1MySQL client version: 5.0.45it doesn't work ! I get the wrong syntax error what the ###### ? Link to comment Share on other sites More sharing options...
aspnetguy Posted October 2, 2008 Share Posted October 2, 2008 The LAST method is for Access.You can do the following to achieve the same results SELECT columnId FROM myTable ORDER BY columnId DESC LIMIT 1 This will return the last columnId in the table. You can adjust the ORDER BY and add in a WHERE as needed to suit your needs. Link to comment Share on other sites More sharing options...
adicrst Posted October 2, 2008 Author Share Posted October 2, 2008 great, thanks alot for your answer Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.