Claire,

Thursday, February 07, 2002, 12:35:07 AM, you wrote:

CF> I want to select all entries in my table that in a column with given
CF> dates findes all dates   inbetween $from_date - $to_date. (These are
CF> vars that the user supplies from the HTML-page). I don't know how to set
CF> up the SELECT query. I tried the following way but it didn't work:

CF> SELECT * FROM table WHERE (col=$from_date - col=$to_date)

CF> What is the correct way?

You can use TO_DAYS() function, look at:
    http://www.mysql.com/doc/D/a/Date_and_time_functions.html

You can refer to:
    http://www.mysql.com/doc/C/o/Comparison_Operators.html




-- 
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




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