Jump to content

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...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.