List:General Discussion« Previous MessageNext Message »
From:Bill Gerrard Date:January 6 2000 9:47am
Subject:RE: Calculations with dates?
View as plain text  
Hi Paul,

My code sample was written to 3.21.x, which didn't include DATE_SUB.  If it
did, I would have used it there...   :(

> If you use the following, MySQL can take advantage of any index
> on the date column.  The expression above is logically equivalent,
> but requires that TO_DAYS(date) be evaluated for each row in the
> table.
>
> WHERE date >= DATE_SUB(CURDATE(),INTERVAL 7 DAY)

Thread
mysqld will not start with --user=rootleif4 Jan
  • Re: mysqld will not start with --user=rootSasha Pachev4 Jan
  • PROPOSAL: Split this list into MySQL-Administration andMySQL-ApplicationThomas David Kehoe5 Jan
    • Re: PROPOSAL: Split this list into MySQL-Administration andMySQL-ApplicationMark Zieg5 Jan
      • Re: PROPOSAL: Split this list into MySQL-Administration andMySQL-ApplicationSven E. van 't Veer5 Jan
      • Re: PROPOSAL: Split this list into MySQL-Administration andMySQL-ApplicationJay J5 Jan
      • Re: PROPOSAL: Split this list into MySQL-Administration andMySQL-ApplicationThomas David Kehoe6 Jan
  • Calculations with dates?Thomas David Kehoe5 Jan
    • Re: Calculations with dates?Bill Gerrard5 Jan
      • Re: Calculations with dates?Paul DuBois6 Jan
        • RE: Calculations with dates?Bill Gerrard6 Jan
          • RE: Calculations with dates?Paul DuBois6 Jan
            • RE: Calculations with dates?Bill Gerrard6 Jan
      • Re: Calculations with dates?Sasha Pachev6 Jan
    • Re: Calculations with dates?Michael Budash5 Jan
Re: PROPOSAL: Split this list into MySQL-Administration and MySQL-ApplicationPeter Speck6 Jan