now() function for inserting date....?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
heerajee
Forum Newbie
Posts: 18
Joined: Sat Feb 25, 2006 12:33 am

now() function for inserting date....?

Post by heerajee »

Hi,
I am wasting alot of time on this, but the current date is not being inserted.
mysql_query("update courierinfo set cstatus=1,Delivereddate=".NOW()." where id='".$_REQUEST['trid']."'");



Plz tell me where is the error.
Thanks in advance.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

I believe NOW is an SQL function and not php

try it without concatenating

set delivereddate=NOW()
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
AndyFielder
Forum Newbie
Posts: 5
Joined: Wed Mar 22, 2006 4:55 am

Post by AndyFielder »

scrotaye wrote:I believe NOW is an SQL function and not php

try it without concatenating

set delivereddate=NOW()
Yup, thats how to do it!
Post Reply