select specific record based on year and month..
Posted: Thu Jun 24, 2004 1:43 am
i've a data column in the table 2004-06-30 (define as date type in mysql)..
now, i want to retrive record that hv year 2004 and month 5 (May)...
the following is the code i've tried to make it work.. but failed..
.... how can i do that...
tq...
now, i want to retrive record that hv year 2004 and month 5 (May)...
the following is the code i've tried to make it work.. but failed..
Code: Select all
$comm = mysql_query("SELECT sal_comm, ord_id FROM sales WHERE emp_id='$emp_id' AND year(sal_date)='2004' AND month(sal_date)='5'");tq...