Jump to content

LIMIT


astralaaron

Recommended Posts

Hello, i have run into a situation similar to this:Multiple users post their products into this database. On the home page of this site, there is a search. When searched, currently all of the products from all of the users (including some user information joined from a separate table.) It works great, except now i am required to change it from posting 'all products' from 'all users' to only '3 products' from 'each user who has relevant products' which can be clicked on to view all, etc.__So i am trying to find out this:-Can you use LIMIT somehow to not return 3 total results, but instead 3 from each user?-Or would I need to first call the database and return all of the different users who have relevant products, then loop through and query the database for each one and LIMIT 3?I am just trying to find an efficient way to make it happen, because it could potentially be pretty big.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...