开发者

What is wrong with this where clause of zend query

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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜