gpt4 book ai didi

php - Joomla Jdatabase 中 WHERE IN 的正确语法

转载 作者:行者123 更新时间:2023-11-29 06:13:18 24 4
gpt4 key购买 nike

我有这个问题

SELECT * 
FROM #__k2_items
WHERE catid IN ('4,10,11,12,13,14,15,16,17,18,19,20,21,22')
AND published='1'

但它不起作用,它只是从 catid 4 中检索项目。

提前致谢。

最佳答案

你想要

SELECT * 
FROM #__k2_items
WHERE catid IN (4,10,11,12,13,14,15,16,17,18,19,20,21,22)
AND published=1

SELECT * 
FROM #__k2_items
WHERE catid IN ('4','10','11','12','13','14','15','16','17','18','19','20','21','22')
AND published='1'

关于php - Joomla Jdatabase 中 WHERE IN 的正确语法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37233120/

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