s0c0 Posted July 10, 2007 Share Posted July 10, 2007 Here is my current query: SELECT tbl1.id, tbl1.username, tbl1.status, tbl1.joined, tbl2.timeDate, tbl1.directory FROM tbl1, tbl2 WHERE tbl1.id = tbl2.users_id GROUP BY tbl1.id This returns their oldest ie first login. I use this for analytics on the backend to determine user activity. So I would like a query that instead that returns the most recent tbl2.timeDate And ideas? Thanks in advanced. Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 10, 2007 Share Posted July 10, 2007 add order by clause Quote Link to comment Share on other sites More sharing options...
s0c0 Posted July 10, 2007 Author Share Posted July 10, 2007 ORDER BY timeDate DESC resolves issue, thanks, I swear I tried that but then again SQL is not a strong point for me, appreciated much teng84 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.