Limit SQL query by users
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Limit SQL query by users
???
You mean limit the number of results the above query can return for each distinct uid?  No other limits whatsoever?
Basically, you want the latest things for each user?

If it's one uid, it can be done (use GROUP BY clause).  More than one is a difficult thing to accommodate with SQL.
http://stackoverflow.com/questions/15376...http://stackoverflow.com/questions/1537606/mysql-group-by-with-top-n-number-of (see 2nd answer)

My Blog
(This post was last modified: 12-19-2012 10:01 PM by ZiNgA BuRgA.)
12-14-2012 09:19 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Limit SQL query by users - Sama34 - 12-14-2012, 06:36 PM
RE: Limit SQL query by users - ZiNgA BuRgA - 12-14-2012 09:19 PM
RE: Limit SQL query by users - Sama34 - 12-18-2012, 12:23 PM
RE: Limit SQL query by users - Sama34 - 12-19-2012, 06:16 PM
RE: Limit SQL query by users - ZiNgA BuRgA - 12-19-2012, 10:02 PM

 Standard Tools
Forum Jump: