FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

PHP masters

 


hellnut
Hey What do i have to do if i want to seek the last record in Mysql table.. like Movelast in vb6.0??
AftershockVibe
Wrong forum but I'll answer your question Razz
Also, this doesn't really have anything to do with PHP! Wink

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
Reply to topic    Frihost Forum Index -> Lifestyle and News -> Jobs and Learning

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.