I have a table which stores a php timestamp as a interger. I need to access this data by date and year. I can grab the year and match it with a column row that exists within the table but need to obtain the month name from the timestamp.
Code so far
$query="SELECT * FROM archive_agent_booking
WHERE agent_id='$account_no'
AND (MONTHNAME(comp_date)='$month' AND year='$year' AND details='')
ORDER BY order_time";
unfortunately this is returning nothing.
comp_date
is the column that contains the timestamps