On Wednesday 06 February 2002 3:35 pm, Claire Forchheimer wrote:
> I want to select all entries in my table that in a column with given
> dates findes all dates   inbetween $from_date - $to_date. (These are
> vars that the user supplies from the HTML-page). I don't know how to set
> up the SELECT query. I tried the following way but it didn't work:
>
> SELECT * FROM table WHERE (col=$from_date - col=$to_date)
>
> What is the correct way?

This is, I believe, covered in the manual.  However, try replacing 
(col=$from_date - col=$to_date) with (col>=$from_date AND col<=$to_date)

---------------------------------------------------------------------
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

Reply via email to