U probeert $litcode
. te binden maar je hebt CONCAT(language,'-',code)
. Je hebt 5 ?
in uw zoekopdracht, maar u probeert 6 parameters te binden.
Verander je code in dit:
Database::connect();
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "UPDATE literatures set spot = ?, code = ?, language = ?, count = ?, litcode = ? WHERE id = ?";
$q = $pdo->prepare($sql);
$q->execute(array($spot,$code,$language,$count,$litcode,$id));
Database::disconnect();