c_shelswell Posted September 11, 2008 Share Posted September 11, 2008 Hi, I'm having a bit of struggle with an order by mysql statement. My query is: select * from news_tours where area='news' order by timestamp limit 0, 3 This works fine and sorts everything if i don't have the limit on there but doesn't sort as expected when it's there. I'm sure this is very simple but if anyone could help that'd be great. Cheers Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted September 11, 2008 Share Posted September 11, 2008 That query, from looking at it, will order rows starting at 0 with with a length of 3 by timestamp. You can also had ASC or DESC. Quote Link to comment Share on other sites More sharing options...
c_shelswell Posted September 11, 2008 Author Share Posted September 11, 2008 I thought it ordered by ASC as default? I followed your advice and added it in and it worked fine though so thanks very much. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.