[EMAIL PROTECTED] (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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php