Tizag Webmaster Forums  

Go Back   Tizag Webmaster Forums > Web Development > Database Forums > MySQL Forum

Reply
 
Thread Tools Display Modes
  #1  
Old 11-06-2009, 08:00 AM
starfish starfish is offline
Newbie
 
Join Date: Jan 2009
Posts: 20
starfish will become famous soon enough
query for this?

what would be the query for getting the last record from a given table?
Reply With Quote
Sponsored Links
  #2  
Old 11-06-2009, 09:58 AM
richei richei is offline
Teacher
 
Join Date: Apr 2007
Location: Smithfield, VA
Posts: 2,171
richei has a spectacular aura aboutrichei has a spectacular aura about
Send a message via MSN to richei
mysql_query("SELECT * FROM table ORDER BY id DESC");

that's assuming you have an id field, just use whatever your auto incrementing field is.
__________________
If i actually managed to help you in any way, please +rep me!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 11:28 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008, Tizag