Posted by Chris Hope on 08/04/06 01:42
walterbyrd wrote:
>
> IchBin wrote:
>
>> >
>> now() is a SQL function.
>>
>
> Tried this:
>
> $day = now();
>
> got this:
>
> Fatal error: Call to undefined function: now()
>
> I dunno. It doesn't seem to work for me. I'll try the quotes next.
That's because now() is *not* a PHP function, it's a SQL function. I
think this fact has been posted five times now, including in the post
you just replied to.
So you use it like this:
INSERT INTO some_tablename (datefield_name) VALUES (now())
--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com
Navigation:
[Reply to this message]
|