friedice Posted April 8, 2011 Share Posted April 8, 2011 hi im having trouble with this query i wana select 3 events that only contain seminar and are the next dates from NOW() date Select * from Events WHERE EventType like '%seminar%' AND Date > NOW() DESC LIMIT 3 thx Quote Link to comment Share on other sites More sharing options...
gristoi Posted April 8, 2011 Share Posted April 8, 2011 Select * from Events WHERE EventType like '%seminar%' AND Date > NOW() ORDER BY Date DESC LIMIT 3 Quote Link to comment Share on other sites More sharing options...
friedice Posted April 8, 2011 Author Share Posted April 8, 2011 cool thx hmm cant even make it ascending order $squery = "Select * from Events WHERE EventType like '%seminar%' AND Date > NOW() ORDER BY Date ASC DESC LIMIT 3 "; Quote Link to comment Share on other sites More sharing options...
gristoi Posted April 8, 2011 Share Posted April 8, 2011 you can only have it in Descending or Ascending - not both cool thanks hmm cant even make it ascending order $squery = "Select * from Events WHERE EventType like '%seminar%' AND Date > NOW() ORDER BY Date ASC DESC LIMIT 3 "; Quote Link to comment Share on other sites More sharing options...
friedice Posted April 8, 2011 Author Share Posted April 8, 2011 omg i just realised i used desc before already thx solved 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.