Re: [PHP] php/mySql SELECT where clause using dates.

2001-05-03 Thread Pierre-Yves Lemaire
Hello, maybe this could help, WHERE TO_DAYS( NOW()) - TO_DAYS( your_date_field ) <= 45 py At 04:30 PM 5/3/01 +0200, you wrote: >***NEWBIE ALERT*** (I am only very new at this) > >PHP and MySQL > >OK - I have a table with data and one of the fields is a Date field. > >Now I would like to SELEC

Re: [PHP] php/mySql SELECT where clause using dates. ooops

2001-05-03 Thread Jon Rosenberg
kildsen" <[EMAIL PROTECTED]> Cc: "PHP General List" <[EMAIL PROTECTED]> Sent: Thursday, May 03, 2001 10:28 AM Subject: Re: [PHP] php/mySql SELECT where clause using dates. > Take out the order by clause or chaqnge it. You can't order by a column you > a

Re: [PHP] php/mySql SELECT where clause using dates.

2001-05-03 Thread Jon Rosenberg
Take out the order by clause or chaqnge it. You can't order by a column you aren't selecting. - Original Message - From: "Dan Eskildsen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 03, 2001 10:30 AM Subject: [PHP] php/mySql

[PHP] php/mySql SELECT where clause using dates.

2001-05-03 Thread Dan Eskildsen
***NEWBIE ALERT*** (I am only very new at this) PHP and MySQL 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 old. Eh, How do I do that? I have tried this: #Declaring variables $today=date("Y-m-d