I am unable to write a SQL query for :
Select any table where the year is 2009 and the month is $array [x]
I know this is not too complicated, but the thing is that the only search field that I have are timestamp.
My code:
Code:
include '../../includes/connect_inc.php' ;
$ year_and_time = mktime (0, 0, 0, 0, 0, date (Y));
$ year_on = date (Y) +1;
$ year_next = mktime (0, 0, 0, 0, 0, $ year_on);
$ query = mysql_query ("SELECT COUNT (*) AS rdv woof_agenda FROM WHERE timestamp>". $ year_and_time. "AND timestamp <". $ year_next. "AND ?");
$ return = mysql_fetch_array ($ query) OR die (mysql_error ());
Is this correct? Can I do so?
Bookmarks