I'm trying to get the code below to work.....
The error:
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
The code:
$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)
Any help would be appreciated!
Thanks!