what I want to do is retrieve some information from my database matching the first 10 digits of the field .
ie i have a date in this format '2008-05-14' and in the database it's as such '2008-05-14 23:38:37'
i though that something like this would work
Code: Select all
$selectquery = "SELECT * FROM mynews WHERE SUBSTRING('newsdate',0,9) = '$todaysDate' ";
Thanks in advance for any help.