Re: Date function

From: Date: Fri, 19 Apr 2002 09:24:15 +0000
Subject: Re: Date function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-93648@lists.php.net to get a copy of this message
Aliam@investcomholding.com (Alia Mikati) wrote: > Hello > I have the following SQL and I wanna insert the current date in one of > the table fields but it's not working. Can u tell me whats the problem? > (I'm using mysql and php) > Thx a lot > > $SQL = "INSERT INTO orders (Customer_Id, Order_Date)". > "VALUES($CustID,date())"; > > try this: $SQL = "INSERT INTO orders (Customer_Id, Order_Date)". "VALUES($CustID,'" . date("m-d-Y") . "')"; -- Henrik Hansen

« previous php.general (#93648) next »