如何在zend框架查询中添加另一个过滤条件

use*_*878 3 zend-framework

这是我的zend查询

return $this->fetchRow($this->select()->where('name = ?', $geofence_name) );
Run Code Online (Sandbox Code Playgroud)

我想在我的查询中添加另一个过滤器,因为我想检查另一个条件.

请指导我.

San*_*kha 10

对于 and where

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

对于 or where

$select = $db->select()
     ->from('products',
            array('product_id', 'product_name', 'price'))
     ->where('price < ?', $minimumPrice)
     ->orWhere('price > ?', $maximumPrice);
Run Code Online (Sandbox Code Playgroud)