Jump to content

select date from table limit 1


Recommended Posts

Hi all, I need to select the highest date out of my table where user = sessionid.

 

for example, USER SESSION ID = 10

 

user_ses_id        Date

12                      2010-05-19

10                      2009-12-01

10                      2010-05-24

30                      2009-05-20

 

so the value I would be calling is '2010-05-24'

 

Does this make sense?

 

My code im trying is

SELECT *
FROM model_pictures
WHERE user_id = colname
ORDER BY model_pictures.user_picture_date DESC LIMIT 1

Link to comment
https://forums.phpfreaks.com/topic/203153-select-date-from-table-limit-1/
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.