I’m having problems with my execution for inserting item into MYSQL
I currently have this code
$save = $dbh->prepare("INSERT INTO tables(id,id2,datetime) VALUES(?,?,?)");
$save -> execute($id,$id2, "UNIX_TIMESTAMP()");
This gives me problems
PDOStatement::execute() expects at most 1 parameter, 3 given
You just can’t use a function as param with execute.
Moreover, execute expects only one parameter : an array, you gave 3 parameters.
UNIX_TIMESTAMP() has to be written directly into the query and
$id1,$id2have to be put in an array