Democreous Posted February 4, 2007 Share Posted February 4, 2007 Does anyone know of any good tutorials on ordering mysql queries or using WHERE statements? I'm trying to get a query result that only displays rows with a certain month that is stored as a date (YYYYMMDD) in MySQL and am having a bit of trouble finding any solid info on the subject. Thank you - Brian Quote Link to comment Share on other sites More sharing options...
.josh Posted February 4, 2007 Share Posted February 4, 2007 one way: $month = 12; // example $query = "select * from table where column like '____$month__' order by column" Quote Link to comment Share on other sites More sharing options...
Democreous Posted February 4, 2007 Author Share Posted February 4, 2007 Thanks, that's exactly what I needed to know Quote Link to comment Share on other sites More sharing options...
fenway Posted February 5, 2007 Share Posted February 5, 2007 <shudder> Why not use the MONTH() function? 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.