如何在zend框架中打印精确的sql查询?
2022-08-30 08:32:29
我有以下代码,我从模型中获取,
...
$select = $this->_db->select()
->from($this->_name)
->where('shipping=?',$type)
->where('customer_id=?',$userid);
echo $select; exit; // which gives exact mysql query.
.....
当我在zend中使用更新查询时,例如,
$up_value = array('billing'=> '0');
$this->update($up_value,'customer_id ='.$userid.' and address_id <> '.$data['address_Id']);
在这里,我想知道确切的mysql查询。有没有办法在zend中打印mysql查询?亲切的建议