Hoi k heb een error op me pagina door insert:S
error:
Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''user_id', 'opponent_id', 'amount', 'detail', 'type_log') VALUES ('1' ,'2' ,'123' at line 1
script:
Code
public function addLog($user_id, $opponent_id, $amount, $detail, $type)
{
try
{
$sql = $this->db->prepare("INSERT INTO `users.logs` ('user_id', 'opponent_id', 'amount', 'detail', 'type_log') VALUES (? ,? ,?, ?, ?)");
$sql->bindParam(1, $user_id);
$sql->bindParam(2, $opponent_id);
$sql->bindParam(3, $amount);
$sql->bindParam(4, $detail);
$sql->bindParam(5,$type);
$sql->execute();
}
catch(PDOException $e)
{
echo $e->getMessage();
}
}
Toon Meer
wat is fout dan