DB_DataObject and cross database links again

From: Date: Wed, 06 Jul 2005 07:29:48 +0000
Subject: DB_DataObject and cross database links again
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19875@lists.php.net to get a copy of this message
Hi there I am trying to update a table in another database. I have the dataobject setup with the other database. I am doing a get ok as in no errors its selecting the record in the database , but when I goto update it its trying tyo find the table in the current database. Doing this in the update query in the DataObject stopped this {$this->_database}.{$table} I tried to run a query to use the second database like so $users = DB_DataObject::factory('users'); $users->query("USE faults"); $users->get($_GET['ID']); //$users->userID = $_GET['ID']; $users->setFrom($_POST); if ($this->_post['password']) { $users->fromValue('password',$this->_password); } $users->update(); Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource (/Volumes/DATA/www/classes/PEAR/MDB2/Driver/mysql.php at line 924) (/Volumes/DATA/www/classes/PEAR/MDB2/Driver/mysql.php at line 924) (/Volumes/DATA/www/classes/PEAR/DB/DataObject.php at line 2293) (/Volumes/DATA/www/classes/PEAR/DB/DataObject.php at line 1520) (/Volumes/DATA/www/classes/Auth/Register.php at line 473) (/Volumes/DATA/www/pres/classes/Users/Profile.php at line 66) (/Volumes/DATA/www/classes/SBS/Page.php at line 49) (/Volumes/DATA/www/classes/SBS/Page.php at line 49)

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