Month() + mysql
Posted: Fri May 11, 2007 8:26 pm
Hi,
Im trying to grab all records that match the month from:
$eventid = '2007-05-11';
using query:
Seems to bring back zero rows when there are 2 rows iin he database matching the 5th month.
Have I got it all wrong?
Thanks
Im trying to grab all records that match the month from:
$eventid = '2007-05-11';
using query:
Code: Select all
$sql = mysql_query("SELECT id, firstname, lastname, phone, cellphone, email, starttime, finishtime, event FROM calendar WHERE MONTH(starttime) LIKE '".$eventid."%' ORDER BY starttime ASC");Seems to bring back zero rows when there are 2 rows iin he database matching the 5th month.
Have I got it all wrong?
Thanks