Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Last record?

Status
Not open for further replies.

maharamDan

IS-IT--Management
Mar 22, 2004
31
US
Hello I have a DB with 4 fields. id title event date.

I would like to query the last record only and display it. I am using mysql and php. The trouble I am finding is how to query the last record by id?

Thanks in advance.

ake care.
 
I think I found a solution $query="select * from soft order by id DESC limit 1

Does that look ok?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top