group by get last record

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Guys i try to join to tables

slides:
id
userid
file
moment

users
id
username

As there few slids per user and i want to get only last one, i use following 
sql query, but it fetches me first slide. How can i make it fetch last one 
please?

 SELECT slides.file, slides.moment, users.id, users.username FROM slides, 
users where users.id=slides.userid GROUP BY users.id desc 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux