Codeigniter Where子句 [英] Codeigniter Where clause
本文介绍了Codeigniter Where子句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
不知怎的,我有点难以建立这样的查询:
给我所有的导航条目linkname not null
Somehow its a bit difficult to for me to build a query like this: Give me all entries of navigation where linkname not null
$query = $this->db->get_where('navigation',array('linkname'!==NULL));
给我错误
where子句中的未知列'0'
Unknown column '0' in 'where clause'
SELECT linkname
, idnavigation
FROM( navigation
)WHERE 0
= 1
SELECT linkname
, idnavigation
FROM (navigation
) WHERE 0
= 1
有任何提示吗?
推荐答案
WHERE
这样的子句:
$this->db->get_where('navigation', 'linkname IS NOT NULL');
这篇关于Codeigniter Where子句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文