note 68463 added to function.date
| From: | rev at NOSPAMO dot returntothepit dot com | Date: | Thu, 27 Jul 2006 18:48:33 +0000 |
| Subject: | note 68463 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115282@lists.php.net to get a copy of this message | ||
the CORRECT MySQl datetime format is
<?php
$date = "Last Saturday";
date("Y-m-d H:i:s",strtotime($date));
$sql = "INSERT INTO pictureusageindex (
subject,date) VALUES
('$subject','$date')";
echo "$sql<br>";
?>
a person who posted above is wrong. leaving out the "-"
----
Server IP: 64.71.164.2
Probable Submitter: 63.160.138.52 (proxied: 1.1 MAANDISA1)
----
X-Spam-Status: No, hits=3.3 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER,
HTML_MESSAGE autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- http://master.php.net/note/edit/68463
Del: integrated -- http://master.php.net/note/delete/68463/integrated
Del: useless -- http://master.php.net/note/delete/68463/useless
Del: bad code -- http://master.php.net/note/delete/68463/bad+code
Del: spam -- http://master.php.net/note/delete/68463/spam
Del: non-english -- http://master.php.net/note/delete/68463/non-english
Del: in docs -- http://master.php.net/note/delete/68463/in+docs
Del: other reasons-- http://master.php.net/note/delete/68463
Reject -- http://master.php.net/note/reject/68463
Search -- http://master.php.net/manage/user-notes.php