早上好,
检查此代码是否转换良好, 首先是MySQLCode
$statement = mysqli_prepare($con, "SELECT * FROM user WHERE username = ? AND password = ?");
mysqli_stmt_bind_param($statement, "ss", $username, $password);
mysqli_stmt_execute($statement);
mysqli_stmt_store_result($statement);
mysqli_stmt_bind_result($statement, $userID, $name, $age, $username, $password);
这是SQLSRV:
$sql = "SELECT * FROM dbo.[user] WHERE username = $username and password = $password";
$stmt = sqlsrv_prepare($conn, $sql, $params);
if($stmt === false){
die( print_r( sqlsrv_errors(), true));
}
有人可以帮我这个代码吗? PLS。