- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有这个问题
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/
我正在为 Joomla 1.7 开发一个简单的留言簿。 如果我尝试插入新消息,JDatabase 会插入一个空行,但我不知道为什么。 这里是表结构 DROP TABLE IF EXISTS `#_
如何在Joomla3中使用jdatabase来更新一条记录。这是我目前所拥有的。 $db =& JFactory::getDBO(); $query = $db->getQuery(true); $q
下面的 Joomla (3.3) Jdatabase 代码(由 Fabrik 使用)应该在数据库中查找名称。该名称以表单 (var $data) 的形式提交,并且值为“green”。 但是,在执行代码
我有这个问题 SELECT * FROM #__k2_items WHERE catid IN ('4,10,11,12,13,14,15,16,17,18,19,20,21,22') A
我在 Fabrik 表单元素的“Eval”部分运行下面的 php 代码。该代码应该在表单字段中返回/输入一个数字,但表单字段中什么也没有出现。 当我使用另一个查询(引用“$query->”行)时,代码
我在 JDatabase 中找不到用于获取行和显示项目的有效语句。 我的代码是这样的: $db = JFactory::getDbo(); $query = $db->getQuery(true);
谁能展示如何与 jDatabase query 对象进行联合? 功能看起来在 Joomla 中,我只是找不到任何带有工作示例的文档... 我想要实现的查询在纯文本中通常看起来像这样: SELECT f
我需要根据 Joomla jdatabase 格式编写一个数据库查询,但我在为下面的 native sql 查询编写 2 个“AND”部分时遇到了困难(我无法根据 http://docs.joomla
描述:我正在自动创建由主表名称组成的数据库名称,并附加与下拉菜单中所选内容相关的全名。 代码: if ($leagueSelect === $result['leagueName'] &
需要在 Joomla 2.5 中对 MySQL 数据库进行一些操作。 使用的优点和缺点是什么: JDatabase 或 直接从 PHP 进行 SQL 操作(使用 php 函数:mysql_connec
我是一名优秀的程序员,十分优秀!