Jump to content

Mysql Select Most Recent Row?


kensbeijing

Recommended Posts

Hi say if I had a table like this called members (this was back in the 1970s)User_ID.......Time (unix epoch)1.................241.................5601.................341.................122141.................45... = spaces by the wayHow would I select only 1 row, which has the highest time (latest row)?Would I do this

mysql_query('SELECT * FROM members WHERE User_ID = 1 ORDERBY Time LIMIT 1')

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...