gpt4 book ai didi

php - 将数组传递给 simple_query() 会导致 mysql 错误

转载 作者:行者123 更新时间:2023-11-29 08:02:43 28 4
gpt4 key购买 nike

我有以下查询:

$this->db->simple_query("UPDATE account 
SET balance = ?
WHERE user = ?",array($balance,$user))

但是,它在 附近给了我一个错误?哪里用户 = ?。将数组传递给查询的正确方法是什么?

最佳答案

来自simple_query docs

It DOES NOT return a database result set, nor does it set the querytimer, or compile bind data

正确的方法是使用用户查询

关于php - 将数组传递给 simple_query() 会导致 mysql 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23361704/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com