我试图使法典下面发挥作用。
错误:
ERRORSQLSTATE[42000]: Syntax error or access violation: 1064
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 ?, ?, ?, ?) at line 1
守则:
$data=array($idApplications,$author,$addedOn,$note);
try {
$STH = $this->DBH->query(
INSERT INTO .$table. (idApplications,Author,NoteAddedOn,Note)
VALUES (?, ?, ?, ?)
);
$STH->execute($data);
}
catch(PDOException $e) {echo $e->getMessage();}
}
(Using PHP PDO and MySQL)
感谢任何帮助!
感谢!