At 11:48 +0200 1/20/03, Putte Koivisto wrote:
>I use MYSQL TO_DAYS function to grab some statistics from database and I use
>SELECT ID FROM database
>WHERE TO_DAYS(NOW()) - TO_DAYS(date_col) >=7
>ORDER BY ID DESC
>I have IIS server and I use Dreamweaver MX to build the statistics page,
>where we use ASP. Problem is, that I get row from every month with date
>difference of 7 instead of rows from last seven days. What went wrong? Do I
>have to specify the date format someway to the TO_DAYS function?
If you want just records for the last 7 days, do you want the
difference to be < 7 rather than >= 7?