How to create WHERE IN clause with Zend_Db_Select

前端 未结 6 1488
-上瘾入骨i
-上瘾入骨i 2021-02-01 00:27

So I am trying to accomplish something like this:

SELECT * FROM table WHERE status_id IN (1,3,4);

using Zend_Db_Select... can\'t find how to do

6条回答
  •  借酒劲吻你
    2021-02-01 01:10

    $completionNo = implode(",",$data);
    
    $db = Zend_Db_Table_Abstract::getDefaultAdapter();
    $select = $db->select()->from(array("p"=>PREFIX . "property_master"),array('id','completion_no','total_carpet_area'))->where("p.completion_no IN (?)", $completionNo);
    

提交回复
热议问题