Jump to content

Question for Zend_Db


milesap

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/165295-question-for-zend_db/
Share on other sites

  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.