<?php
$oneriKontrolSorgu = $db->prepare("SELECT * FROM suggestions WHERE forWhat = ?, wantedID = ?, oldValue = ?, newValue = ?");
$oneriKontrol = $oneriKontrolSorgu->execute(array($forWhat, $wantedID, $oldValue, $newValue));
$oneriDB = $oneriKontrol->fetch();
if($oneriKontrol){
print_r($oneriDB);
}else{
print_r($oneriKontrolSorgu->errorInfo());
}
?>dener misiniz?
Hocam ilk olarak fetch() fonksiyonunun yanlış kullanımından dolayı bir hata çıktı. Ancak o hatayı;
$oneriDB = $oneriKontrol->fetch(); ----->>>> $oneriDB = $oneriKontrolSorgu->fetch();
Şeklinde çözdüm. Fakat sonuca geldiğimizde hata şu şekli aldı;
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 ', wantedID = '25', oldValue = 'tr', newValue = 'fr'' at line 1
)
Devam ediyor