这段代码给了我这个错误:无效的参数号:绑定变量的数量与令牌的数量不匹配
$fields[':email']=$_GET["email"];
$fields[':password']=$_GET["password"];
$fields[':telefono']=$_GET["telefono"];
$fields[':old_email']=$_GET["old_email"];
$fields[':isAdmin']=0;
$qry.="UPDATE utente SET Email:=email, Password:=password ,Telefono:=telefono, isAdmin=:isAdmin WHERE Email=:old_email";
$sth=$CONNESSIONE->prepare($qry);
$sth->execute($fields);
字段的 var_dump 打印这个
array(5) { [":email"]=> string(5) "test2" [":password"]=> string(1) "b" [":telefono"]=> string(7) "0415600" [":old_email"]=> 字符串(4) "测试" [":isAdmin"]=> int(0) }
我的桌子是这个
CREATE TABLE IF NOT EXISTS `utente` (
`Email` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
`Password` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
`Telefono` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
`isAdmin` tinyint(1) NOT NULL,
UNIQUE KEY `Email` (`Email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
为什么这不起作用?