Hey What do i have to do if i want to seek the last record in Mysql table.. like Movelast in vb6.0??
PHP masters
Wrong forum but I'll answer your question
Also, this doesn't really have anything to do with PHP!
In MySQL there is no MoveLast() function because of erm... let's say design differences between how (presumably) JET works and MySQL.
MySQL is of the opinion that you should define your own primary key, unlike JET which can refer to it's own internal private keys.
All you need to do is identify the primary key in your table (the AutoIncrement integer field probably called somethingID) and execute the following SQL:
Also, this doesn't really have anything to do with PHP!
In MySQL there is no MoveLast() function because of erm... let's say design differences between how (presumably) JET works and MySQL.
MySQL is of the opinion that you should define your own primary key, unlike JET which can refer to it's own internal private keys.
All you need to do is identify the primary key in your table (the AutoIncrement integer field probably called somethingID) and execute the following SQL:
| Code: |
| SELECT * FROM table ORDER BY somethingID DESC LIMIT 1 |
