mysql PDO多次UPDATE不起作用

时间:2017-02-22 08:51:19

标签: php mysql pod

我试图建立一个有用户登录的网站。并为我制作管理面板。有一个编辑区,我尝试编辑我的用户信息。但是有一个关于更新的问题,我无法解决它。

if(isset($_POST['is_login'])){ // When press to save button
		
		$adSoyad=$_POST['adSoyad'];
		$email=$_POST['email'];
		$password=$_POST['password'];
		$iban=$_POST['iban'];
		$kulSite=$_POST['kulSite'];
		$tel=$_POST['tel'];
		$tiklama=$_POST['tiklama'];
		$kur=$_POST['kur'];
		$kRefKod=$_POST['kRefKod'];
		$fRefKod=$_POST['fRefKod'];
		$reklamSite=$_POST['reklamSite'];
		$ico=$_POST['ico'];
		$fBilgi=$_POST['fBilgi'];
		
		// 
		
		$sorgu = $vt->prepare("UPDATE ".$kTablo." SET
		kADI = :kADI, kEPOSTA = :kEPOSTA, kSIFRE = :kSIFRE, kIBAN = :kIBAN, kSITE = :kSITE, kTEL = :kTEL, kTIKLAMA = :kTIKLAMA, kKUR = :kKUR, kREF = :kREF, kfREF = :kfREF, kfSITE = :kfSITE, kfICO = :kfICO, kfICERIK = :kfICERIK
		WHERE kREF = :kullanici");
		$guncelle = $sorgu->execute(array(
		"kullanici" => "".$kullanici."",
		"kADI" => "".$adSoyad."",
		"kEPOSTA" => "".$email."",
		"kSIFRE" => "".$password."",
		"kIBAN" => "".$iban."",
		"kSITE" => "".$kulSite."",
		"kTEL" => "".$tel."",
		"kTIKLAMA" => "".$tiklama."",
		"kKUR" => "".$kur."",
		"kREF" => "".$kRefKod."",
		"kfREF" => "".$fRefKod."",
		"kfSITE" => "".$reklamSite."",
		"kfICO" => "".$ico."",
		"kfICERIK" => "".$fBilgi."",
		
		));
		
		if($sorgu->rowCount()=="0"){ $error = 'Data not saved!'; 
		}else{ header("Location: ".$webAdres."panel/bilgi.php?ref=".$kullanici."");  }
}

当我按下保存按钮时,我得到“数据未保存”,这意味着rowCount = 0并且我的查询中存在问题。我需要你的帮助。

祝你好运

0 个答案:

没有答案