I can select all records of recent month from database using,
$month = (mktime(0,0,0,date('n'),1));
$q="SELECT * FROM table WHERE timestamp>$month";
This query will generate August’s(recent month) records.
I have to select all records of each month(January/February../July).
How can I select all other month’s details?
Thanks!
safety tips : change the column name bcoz timestamp is mySQL reserve keyword and it will lead to confusion , otherwise always use
`with column name.i asuume that dateColumn datatype is datetime
now get the value of selected Month
then try with mySQL MONTH()
edit
if you store timestamp value in dateColumn then use this