Jump to content

Recommended Posts

SELECT E1.name AS name, E1.id AS id, E2.name AS parentname FROM categories AS E1 INNER JOIN categories AS E2 ON E1.parent_id = E2.id WHERE E2.parent_id = '0' ORDER BY E1.amount ASC

 

So I want to limit the results from E1 (for each E2 record) to 5 only

 

How can I do that?

 

Gausie

Link to comment
https://forums.phpfreaks.com/topic/98489-limit-on-a-join-cant-work-it-out/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.