> 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 ...... and "$start_date < create_date< $end > _date
You want: WHERE $start_date < create_date AND $end_date > create_date or... 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... --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php