note 47040 added to function.date
| From: | adamdoti at yahoo dot com | Date: | Mon, 01 Nov 2004 03:23:17 +0000 |
| Subject: | note 47040 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-79423@lists.php.net to get a copy of this message | ||
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.
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+47040
Delete -- http://master.php.net/manage/user-notes.php?action=delete+47040&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47040&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47040&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47040&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47040&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47040&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+47040&report=yes
Search -- http://master.php.net/manage/user-notes.php