> 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
> 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  ......  and   "$start_date <  create_date<  $end
> _date

You want:

WHERE $start_date < create_date AND $end_date > create_date


WHERE create_date BETWEEN $start_date AND $end_date

but, this is dependant on your format of create_date and the variables
$start_date and $end_date. All of them should be MySQL DATE, DATETIME, or
TIMESTAMP columns/format.

---John Holmes...

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

Reply via email to