zend 查询的 where 子句有什么问题 [英] What is wrong with this where clause of zend query
本文介绍了zend 查询的 where 子句有什么问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我对不理解 zend 查询的 where 子句中的错误感到很生气.我的查询是
<前>$select->where("id=".$get['value']." OR description like '%".$get['value']."%'");$get['value']
是我要搜索的查询.但结果是 500 internal server error
并且它总是说 get['value']
的值是未知列.例如,如果我在 testing
中搜索了 description
列,它总是说 testing
在未知的列中......为什么会发生这种情况
解决方案
检查此文档 zend_db_select 你的语法可能有误.
$table->select()->where('id = ?', $get['value'])->orWhere('description like ?', '%' . $get['value'] . '%');
已编辑!
Hi I am mad on not understanding the error in this where clause of zend query. My query is
$select->where("id=".$get['value']." OR description like '%".$get['value']."%'");
$get['value']
is the query that I want to search. But result is 500 internal server error
and it always says the value of get['value']
is unkown column. For example if I have searched testing
for description
column it always says that testing
in unknown columns... why is this happening
解决方案
Check this docs zend_db_select you may wrong in your syntax.
$table->select()
->where('id = ?', $get['value'])
->orWhere('description like ?', '%' . $get['value'] . '%');
Edited!
这篇关于zend 查询的 where 子句有什么问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文