2 messages in com.mysql.lists.win32Followup to TO_DAYS problem
FromSent OnAttachments
Mindy _02 Feb 2004 17:21 
Eduardo Silva03 Feb 2004 00:12 
Subject:Followup to TO_DAYS problem
From:Mindy _ (shad@hotmail.com)
Date:02/02/2004 05:21:04 PM
List:com.mysql.lists.win32

Hi everyone,

Of course, as soon as I ask for help, I solve my own problem. I didn't think about it returning dates that would be negative in time, so I mainly just needed to add another condition that made sure it returned no dates previous to the Monday.

$db_result = mysql_query("SELECT * FROM tblTasks_Comments WHERE TO_DAYS(Date) - TO_DAYS('2003-10-13') <= 5 AND TO_DAYS(Date) - TO_DAYS('2003-10-13') >= 0", $db_conn);

Sorry for taking your time, but if anyone has a more efficient way to do this, I'm open to suggestions.

Cheers!