gpt4 book ai didi

php - 在 ($array) 和某个 = 的位置?

转载 作者:行者123 更新时间:2023-11-29 23:24:12 28 4
gpt4 key购买 nike

我有这个,其中$results_array是一个内爆整数数组:

if ($stmt = $cxn->prepare('SELECT id FROM follows WHERE id IN (' . $results_array . ') AND user_id = ?')) {
$stmt->bind_param('i', $user_id);
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($temp);

$final_array = array();
while($stmt->fetch()) {
$final_array[] = $temp;
}

$final_array = implode(',', $final_array);

$stmt->close();
}

问题在于查询的 AND 检查。如果我删除 AND 检查,它工作正常,但我需要在那里进行该检查。我该如何解决这个问题?

最佳答案

尝试在屏幕上打印 $results_array 以了解数组的值,然后您可以运行查询来准确了解错误所在。

关于php - 在 ($array) 和某个 = 的位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27081896/

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