Re: more DB_dataObjects

From: Date: Thu, 06 Feb 2003 08:19:49 +0000
Subject: Re: more DB_dataObjects
References: 1  Groups: php.pear.general php.pear.general 
Request: Send a blank email to pear-general+get-3623@lists.php.net to get a copy of this message
I will be adding a check to affectedRows in update, insert and delete soon - in which case they will return false if there where no affected rows. if there is an error emitted from pear's ->query('update ....'), then update will currently return false. (again this need changing to set $object->_lastError. Regards Alan David Dahl wrote:
I answered my own question before about the setFrom() method... anyway: what is the best way to determine if an update was sucessful after a query like this: $updateAssoc = new DataObjects_Association;
        $updateAssoc->get($_POST[assoc_id]);
        $updateAssoc->setFrom($_POST);
        $updateAssoc->assoc_logo = $home_page_logo;
        $updateAssoc->assoc_picture = $home_page_photo;
        $updateAssoc->update();
do i check for a PEAR Error? how? thanks in advance! David


« previous php.pear.general (#3623) next »