OBJECTIVE - I am trying to pull all entries from $dbTable that were entered between November 1, 2007 23:18:18 and December 8, 2007 23:18:18.
DECLARATIONS:
$dbTable = table name
date field info = `dAt` datetime NOT NULL default '0000-00-00 00:00:00'
FAILED ATTEMPT - it showed no errors, just didnt pull anything
$query = "SELECT * FROM $dbTable WHERE 'dAt' >= '2007-11-01 23:18:18' AND 'dAt' <= '2007-12-08 23:18:18'";
This worked, and displayed all dates, including dates in the range specified above.
$query = "SELECT * FROM $dbTable ORDER by 'dAt' DESC";
any ideas would be appreciated
thanks
2006-12-02
23:16:45
·
1 answers
·
asked by
f1avor_f1av
3
in
Programming & Design