使用php和mysqli

时间:2015-08-24 16:18:12

标签: php android mysqli sql-update sqlbindparameter

我想找到用户名,密码,电子邮件国家/地区等匹配并更新"积分"在那一排1点。为什么我的代码没有工作?

<?php

$con=mysqli_connect("mysql_host","mysql_user","mysql_password","mysql_database");

$country = $_POST["country"];
$district = $_POST["district"];
$username = $_POST["username"];
$email = $_POST["email"];
$password = $_POST["password"];



$query = "UPDATE table SET points=points+1 WHERE country = ? AND district = ? username = ? AND email = ? AND password = ?";
$statement = mysqli_prepare($con, $query);
mysqli_stmt_bind_param($statement, "isssss", $points, $country, $district, $username, $email, $password);
mysqli_stmt_execute($statement);
mysqli_close($con);
exit;

?>

0 个答案:

没有答案