PHP Mysqli UPDATE错误 [英] PHP Mysqli UPDATE error
本文介绍了PHP Mysqli UPDATE错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我做了一些编码并撤回了这个问题:
I have done a little bit of coding and withdrawed this problem:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? = ? WHERE `Username` = ?' at line 1
我不明白这个准备有什么问题:
I don''t understand whats wrong with this prepare:
require 'mysqli_data/mysqli_connection.php';
$qString = $gConnection->prepare("UPDATE `accounts` SET ? = ? WHERE `Username` = ?");
printf($gConnection->error);
$qString->bind_param('sss', $key, $data, $gConnection->real_escape_string($user));
$qString->execute();
$qString->close();
return true;
感谢您的帮助!
Thanks for any help!
推荐答案
qString =
qString =
gConnection-> prepare( 更新`accounts` SET?=?WHERE`Username` =?);
printf(
gConnection->prepare("UPDATE `accounts` SET ? = ? WHERE `Username` = ?"); printf(
gConnection->错误);
gConnection->error);
这篇关于PHP Mysqli UPDATE错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文