小编jhe*_*gt7的帖子

MySqli命令不同步; 你现在不能运行这个命令

我已将我的注册脚本从mysql转换为mysqli.我工作得很好,但它现在给了我错误

Commands out of sync; you can't run this command now
Run Code Online (Sandbox Code Playgroud)

这是我用来注册用户的功能

function register_user($register_data) { 
global $myConnection;
array_walk($register_data, 'array_sanitize'); 
//Make the array readable and seperate the fields from data 
$fields = '`' . implode('`, `', array_keys($register_data)) . '`'; 
$data = '\'' . implode('\', \'', $register_data) . '\''; 
//Insert the data and email an activation email to the user 
mysqli_query($myConnection, "INSERT INTO `members` ($fields) VALUES ($data)") or die(mysqli_error($myConnection)); 
email($register_data['mem_email'], 'Activate your account', "Hello " . $register_data['mem_first_name'] . ",\n\nThank you for creating …
Run Code Online (Sandbox Code Playgroud)

php mysql mysqli

8
推荐指数
1
解决办法
2万
查看次数

标签 统计

mysql ×1

mysqli ×1

php ×1