PHP SQL insert current date statement

What is the statement and value setting for inserting current date to DB using PHP.

 $sql = "INSERT INTO userTable (reg_date) VALUES (?????????)";

Open in new window

yaron89Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
deviprasadgConnect With a Mentor Commented:
For MySQL use now().

 $sql = "INSERT INTO userTable (reg_date) VALUES (NOW())";


Refer:
http://stackoverflow.com/questions/7574656/how-to-generate-and-insert-datetime-into-a-mysql-database-php
0
 
yaron89Author Commented:
NOW() is for current datetime
I found  CURDATE()  for current date
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.