How do i insert the value of date('d-m-Y h:i:s')
in the clock column with DATETIME data type in MySQL table?
date_default_timezone_set("Asia/Kuala_Lumpur");
$date=date('d-m-Y h:i:s');
$sql=mysqli_query($connection,"INSERT INTO time (clock)VALUES($date)");
i keep getting this error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '11:22:03)' at line 1