note 47040 deleted from function.date by tularis

From: Date: Mon, 01 Nov 2004 06:45:58 +0000
Subject: note 47040 deleted from function.date by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-79424@lists.php.net to get a copy of this message
Note Submitter: adamdoti at yahoo dot com ---- What am I doing wrong?! Seems straight forward but I can not get any resultrs. Basically all I want to do is do a Quesry against my mySQL DB and AND a WHERE with the date ranges. $startTime = strtotime("2000-10-31 10:15:42"); $endTime = strtotime("2005-10-31 10:15:42"); $nowTime = strtotime("now"); $startTime2 = date($startTime); // REFORMAT THE DATE $endTime2 = date($endTime); // REFORMAT THE DATE $result = $db->sql_query("SELECT sid, catid, aid, title, time, hometext, bodytext, comments, counter, topic, informant, notes, acomm, score, ratings FROM ".$prefix."_stories WHERE topic='$new_topic' AND time BETWEEN '$startTime2' AND '$endTime2' $querylang ORDER BY time DESC limit $storynum"); You'll see i have tried to formet the time/date string many different ways, but cant get anthing to work reliably. ---- Reason: bad code

« previous php.notes (#79424) next »