作者:263企业邮箱温州授权合作伙伴 | 来源:互联网 | 2023-05-17 04:35
IamtryingtopassastringintomyMySQLipreparedstatementbutitgivesmetheerror:我试图将一个字符串传
I am trying to pass a string into my MySQLi prepared statement but it gives me the error:
我试图将一个字符串传递给我的MySQLi预处理语句,但它给了我错误:
Cannot pass parameter by reference in MySQLi
在MySQLi中无法通过引用传递参数
Here is the relevant code:
这是相关的代码:
$kv = json_encode(array($key => $value));
$stmt->prepare("insert into rules (application_id, ruletype, rule_name, rule_info) values (?, ?, ?, ?);");
$stmt->bind_param('iiss', $application_id, 1, $config_name, $kv);
2 个解决方案