I have a column in my mySql database that holds a date that I've added each record called
designadddate I'm trying to create a filter to only pull up the records that have been added over the last two weeks. This is my code ... I added the echo for the $today and $twoweeksago variables to make sure something was being calculated, they are showing up correct as 2003-03-03 and 2003-02-17 ... but it isn't pulling up any records -- it's not bombing out and giving me the Couldn't execute query message - but I know there's three records that I made sure had dates in between this range. I also tried using BETWEEN and it didn't seem to work either. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> $today = date ("Y-m-d"); $twoweeksago = date("Y-m-d",mktime(0,0,0,date(m), date(d)-14, date(Y))); echo"$today\n"; echo"$twoweeksago\n"; /* Select designs of the given type */ $query = "SELECT * FROM designs, appliquetable, puffyfoamtable WHERE designs.puffyfoam = puffyfoamtable.puffyfoam AND designs.applique = appliquetable.applique AND (designs.designadddate <= $today AND designs.designadddate >= $twoweeksago)GROUP BY catcode ORDER BY designfile"; $result = mysql_query($query) or die ("Couldn't execute query."); >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Any help would me much appreciated! TIA Renee Toth --------------------------------------------------------------------- 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