I'm a new user of this website. I'm trying to execute this simple query:
$id_book=$_REQUEST['id_book'];
$date=date("Y/m/d");
$sql="INSERT INTO books(id_book,date) VALUES($id_book,'$date')";
if(!$mysqli->query($sql)){
die($mysqli->error.". ".$mysqli->errno);
};
but got this error message:
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 ''2019/02/27')' at line 1. 1064
What am I doing wrong? Can someone help me please?