RE: [PHP] Why isn't now() working?
| From: | Greg Linnell | Date: | Mon, 04 Sep 2000 14:57:15 +0000 |
| Subject: | RE: [PHP] Why isn't now() working? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-15144@lists.php.net to get a copy of this message | ||
Or for the purposes of sql, probably better to use "Ymd" instead of "dmY".
:-)
-----Original Message-----
From: Greg Linnell [mailto:greg@william-russell.co.uk]
Sent: 04 September 2000 15:53
To: 'William S Poarch'; php-general@lists.php.net
Subject: RE: [PHP] Why isn't now() working?
The syntax is fine in the SQL, I don't believe there is a now() function. I
might be wrong.
function now(){return date("dmY",time());}
when called returns 'now' as 01012000.
HTH
Greg
-----Original Message-----
From: William S Poarch [mailto:scott@youcanspeak.com]
Sent: 04 September 2000 15:38
To: php-general@lists.php.net
Subject: [PHP] Why isn't now() working?
Any ideas why this code correctly enters everything but the date in the
"date" field?
$sql = "INSERT INTO commercial_sent (address, date, first_topic,
second_topic, third_topic, company_pkey) VALUES
('$to','now()','$topic1','$topic2','$topic3','$usercorp')";
Appreciate any help.
- - - - - - - - - - - - - -
Scott Poarch
GlobalHost.com
- - - - - - - - - - - - - -
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net