I get the error:
SQLSTATE[HY093]: Invalid parameter number: mixed named and positional parameters
when I try to run the following code:
public function getScore($matchID,$setone,$settwo,$getChallengerScore,$getOpponentScore,$fileOpponentData,$fileChallengerData)
{
try
{
$stmt = $this->db->prepare("UPDATE matches SET `winner` = $setone
AND `looser` = $settwo
AND `winner_score` = $getChallengerScore
AND `looser_score` = $getOpponentScore
AND `opponent_blob` = '".$fileOpponentData."'
AND `challenger_blob` = '".$fileChallengerData."'
WHERE `id` = $matchID");
#var_dump($stmt);
$stmt->execute();
return $stmt;
}
catch(PDOException $e)
{
echo $e->getMessage();
}
}
I'm not great with PDO, haven't had many issues but this I cannot solve on my own. Any help would be much appreciated.