***NEWBIE ALERT***  (I am only very new at this)


OK - I have a table with data and one of the fields is a Date field.

Now I would like to SELECT all records where the date is less that 45 days

Eh, How do I do that?

I have tried this:

#Declaring variables
$lastmonth = $today-30

$query = "SELECT * FROM customers WHERE Site='egebjergnet' AND
DatoOprettet>'$lastmonth' ORDER BY FirmaNavn";

AND I get an error, of course.  hmmm
Regards from Denmark, Europe
Please cc your reply to [EMAIL PROTECTED]
I haven't lost my mind, I've got it backed up on TAPE somewhere.......

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to