hey people,
Im trying to do this:
$id = '2006-05';
$query = "select * from $TableName where Date LIKE $id order by id DESC";
The Date field is formatted as DATE and id like to pull out the entrys where the DATE is like the id for example: 2006-05 which is the year and month.
Is this not possible the way im trying to do it or am I getting the above code wrong?
should I be trying something like this instead:
$query = "SELECT * FROM $TableName WHERE $id LIKE DATE_FORMAT(Date,'%M %Y') ORDER BY 'Date' DESC";
Any help is welcome, thanks.