开发者

how to add another filter condition in zend framework query

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜