Query construction (again)

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Query construction (again)
Groups: php.db 
Request: Send a blank email to php-db+get-11652@lists.php.net to get a copy of this message
Hey there folks - similar problem - different project! I want to select some records for a period of 7days after their insert [dateFrom] date. Last time I asked you guys for help I was helped toward the following solution: $sql = "SELECT * FROM $Tpostings WHERE now()>=dateFrom AND now()<dateTo"; The problem in this new project is that the 'dateTo' field is not included in the DB. It is 7-days after 'dateFrom'. So why does the following query not work: $sql = "SELECT * FROM $tabitem WHERE DATE_ADD(submitDate, INTERVAL 7 DAY)"; No error is received though... Any pointers are heartily taken on board! Cheers Russ #-------------------------------------------------------# "Believe nothing - consider everything" Russ Michell Anglia Polytechnic University Webteam e: r.j.michell@apu.ac.uk w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #-------------------------------------------------------#

« previous php.db (#11652) next »