$conn = new mysqli('localhost','root','123','zx','3306');if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$prepare = $conn -> prepare("INSERT INTO test (uid,name) VALUES('?','?')");$num = 12;$hanzi = "xiha";$prepare -> bind_param('is',$num,$hanzi);$prepare -> execute();
test表字段,uid int(11) name varchar(30)Warning: mysqli_stmt::bind_param() [function.mysqli-stmt-bind-param]: Number of variables doesn't match number of parameters in prepared statement in
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货