Ordering a mysql query?

Try this: SELECT * FROM LinkPages INNER JOIN Pages ON Pages. PageID = LinkPages. PageID WHERE linkmemberID='MEMBERID' ORDER BY startDate DESC LIMIT 5.

Worked a treat! Thanks! – Jai Aug 30 at 17:58.

SELECT lp. PageID, lp. LinkmemberID, lp.

JoinDate FROM LinkPages lp, Pages p WHERE lp. LinkmemberID='MEMBERID' AND lp. PageID = p.

PageID ORDER BY p. StartDate DESC LIMIT 5.

Haha! I'm 2 secs late ;-) – HBublitz Aug 30 at 17:22.

You have two options, either you can JOIN or you can use a subquery: SELECT * FROM LinkPages WHERE linkmemberID='MEMBERID' ORDER BY (SELECT startDate FROM Pages WHERE Pages. PageID = LinkPages. PageID) DESC LIMIT 5 For good measure, here's the join: -- be sure to use L.

* here, otherwise you get all of the columns from -- pages as well SELECT L. * FROM LinkPages L INNER JOIN Pages P ON P. PageID = L.

PageID WHERE linkmemberID='MEMBERID' ORDER BY P. StartDate DESC LIMIT 5.

SELECT lp. * FROM LinkPages lp, Pages p WHERE lp. PageId = p.

PageId AND lp. LinkmemberID='MEMBERID' ORDER BY p. StartDate LIMIT 5 sorry - forgot the ORDER BY ...

The jQuery Certificate documents your knowledge of jQuery. The XML Certificate documents your knowledge of XML, XML DOM and XSLT. The ASP Certificate documents your knowledge of ASP, SQL, and ADO.

The PHP Certificate documents your knowledge of PHP and SQL (MySQL).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions