MySQL Forums
Forum List  »  Newbie

Re: LIMIT result for paging
Posted by: Bob johnston
Date: December 02, 2014 02:58AM

Thank you Rick!

That does some of the job I was after - so now I have this working code

SELECT * FROM
(
SELECT distinct catalogID
FROM `products`
ORDER BY catalogID
LIMIT 0, 10
) AS T1
JOIN `packages` T2 ON T1.catalogID = T2.catalogID ORDER BY T1.catalogID ASC, T2.packsize ASC

In order to retriewe all of the info from Table `products` is there a more lean way than to add : JOIN `products` T3 ON T2.catalogID = T3.catalogID

That would be my last(?) question

Options: ReplyQuote


Subject
Written By
Posted
November 30, 2014 04:17PM
November 30, 2014 11:41PM
December 01, 2014 02:57AM
December 01, 2014 09:43AM
Re: LIMIT result for paging
December 02, 2014 02:58AM
December 02, 2014 06:18AM
December 02, 2014 09:52AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.