lmcm2008 Posted July 12, 2012 Share Posted July 12, 2012 HI: I?m trying to make a form to get the results from a database that has an DATE record, but I don?t know how to make it. Is there any function in PHP that calling a select * from TABLE where DATE="08"...? for example?? How can I make this? I need it and don?t know what to do... Can you help me? I need to select by month and by year... Thanks a lot. regards Link to comment https://forums.phpfreaks.com/topic/265560-select-with-dates/ Share on other sites More sharing options...
mikosiko Posted July 12, 2012 Share Posted July 12, 2012 all you probably need to read ... with examples included http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html Link to comment https://forums.phpfreaks.com/topic/265560-select-with-dates/#findComment-1361033 Share on other sites More sharing options...
lmcm2008 Posted July 12, 2012 Author Share Posted July 12, 2012 Ok, then, If I do this: SELECT * FROM TABLE WHERE MONTH($mydate)="08"; 08 for example... This will run and return me all the records that I have where the month is 08??? Thanks Link to comment https://forums.phpfreaks.com/topic/265560-select-with-dates/#findComment-1361039 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.