Re: [PHP-DB] how can I do?

2002-09-19 Thread 1LT John W. Holmes
> I am trying to find the records whose create dates (field name > =create_date) are between the ones I want .For example , I want to seee the > records between $start_date and $end_date ..So I tried the code > below..But it looks not that right to me?... > > select * from bug where ..

Re: [PHP-DB] how can I do?

2002-09-19 Thread 1LT John W. Holmes
> Or this works well too and might be faster for the DB. > > SELECT * FROM SomeTable WHERE create_date BETWEEN $start_date AND > $end_date Benchmark it yourself, but I've found that BETWEEN is slower. It's easier to read, though. ---John Holmes... -- PHP Database Mailing List (http://www.php.

RE: [PHP-DB] how can I do?

2002-09-19 Thread Jackson Miller
Demirkus'; [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: [PHP-DB] how can I do? > > > SELECT * from SomeTable where dateinserted>$start_date AND > dateinserted<$end_date > > Dateinserted is the date stamp column in your table. > > Aaron > >

RE: [PHP-DB] how can I do?

2002-09-19 Thread Aaron Wolski
SELECT * from SomeTable where dateinserted>$start_date AND dateinserted<$end_date Dateinserted is the date stamp column in your table. Aaron -Original Message- From: Meltem Demirkus [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 19, 2002 8:36 AM To: [EMAIL PROTECTED]; [EMAIL PROT