开发者

how to add another filter condition in zend framework query

开发者 https://www.devze.com 2023-02-22 04:12 出处:网络
This is my zend query return $this->fetchRow($this->select()->where(\'name = ?\', $geofence_name) );

This is my zend query

return $this->fetchRow($this->select()->where('name = ?', $geofence_name) );

and I want to add another filter in my query, bec开发者_如何学Goause I want to check another condition.

please guide me.


For and where

$select = $db->select()
    ->from('products',
        array('product_id', 'product_name', 'price'))
    ->where('price > ?', $minimumPrice)
    ->where('price < ?', $maximumPrice);

For or where

$select = $db->select()
     ->from('products',
            array('product_id', 'product_name', 'price'))
     ->where('price < ?', $minimumPrice)
     ->orWhere('price > ?', $maximumPrice);
0

精彩评论

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