2009年7月8日星期三

[fw-db] Zend_Db question

Hello Everyone,

I was wondering if there is a way to alter the values returned from MySQL
within the Zend_Db_Table_Abstract class. Bear with me, I'll give you an
example of what I mean! I fetch rows like this:

$billing = new Billing(); //(Zend_Db_Table_Abstract class)
$getRow = $billing->fetchRow($billing->select()->where('id = ?', 1));


The above returns all columns in my billing table, say transaction and price
where id = 1, good so far. Now is it possible to alter, say price, in the
Zend_Db_Table_Abstract class? I know how to alter data for update and insert
in Zend_Db_Table_Abstract:

public function update(array $data)
{
$data['price'] = '$10';
return parent::update($data);
}


but not sure how to do this for data that's retrieved from the database. Can
anyone point me in the right direction or have a solution, I just can't
figure it out. Thanks in advance!
--
View this message in context: http://www.nabble.com/Zend_Db-question-tp24403008p24403008.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: