This topic is locked

SQL Where Clause

4/6/2006 4:12:22 PM
PHPRunner General questions
D
DouglasB author

I needed some what to determine whar records in the database where still vaild and which ones have expired so I created a Archive_dte field so the person inputting the record can select a date that want that record to expire.
Then I went into my project and created this statement in Step 4:
select `id`,

`agency_name`,

`sysnopsis`,

`bid_date`,

`contact_name`,

`contact_phone`,

`contact_email`,

`meeting_date`,

`meeting_location`,

`value_of_procurement`,

`reference_number`,

`notes`,

`User_ID`,

`Plans`,

`attachments`,

`Archive_dte`,

`bid_entered`

From `bid_main` WHERE (((bid_main.Archive_dte)>Date()));`
But this totally wacks everything up. So my question is:
What is the correct statement if I want to display only records with a Archive_dte greater than today?

Sergey Kornilov admin 4/7/2006

Douglas,
this is correct query:

select `id`,

`agency_name`,

`sysnopsis`,

`bid_date`,

`contact_name`,

`contact_phone`,

`contact_email`,

`meeting_date`,

`meeting_location`,

`value_of_procurement`,

`reference_number`,

`notes`,

`User_ID`,

`Plans`,

`attachments`,

`Archive_dte`,

`bid_entered`

From `bid_main` WHERE `Archive_dte`>now()