Hi there everyone,

I use the following to store the current date in my db:

 $date = date("mdY");

then to decrease the day by -1 I use the following:

$date = date("Y");
$date2 = date("m");
$date3 = date("d")-1;

$dateb = '$date$date2$date3';

Now what I need to do, is when a DB operation is run it checks the DB to see
if there are any dates that match $dateb or less (Yesterday or before) and
then delete those only, leaving todays in the DB, I tried the following with
no success:

mysql_query ("DELETE FROM orderstemp WHERE < '$dateb'
             ");

This query works if I do a delete by id, but not how i'm doing it here, does
anyone have any ideas?  Be gentle with me, dates are newish to me :-)

Thanks.

Chris


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to