PDO PHP用UNIX_TIMESTAMP()编写并执行

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,$id2 have to be put in an array

$save = $dbh->prepare("INSERT INTO tables(id,id2,datetime) VALUES(?,?,UNIX_TIMESTAMP())");
$save -> execute(array($id,$id2)); 

Matter not about function as param, the same problem I had I just forgot to show data as array() items... Either, you may use timestamp.

Instead of this:

$sec->execute($v,time(),$student_id);

One should be like this:

$sec->execute(array($v,time(),$student_id));