Re: DB_DataObject on the fly
| From: | Alan Knowles | Date: | Sat, 31 Jan 2004 08:19:20 +0000 |
| Subject: | Re: DB_DataObject on the fly | ||
| References: | 1 2 | Groups: | php.pear.general php.pear.general |
| Request: | Send a blank email to pear-general+get-10462@lists.php.net to get a copy of this message | ||
Can you provide a test case:
eg.
include_once dirname(__FILE__)."/../DataObject.php";
include_once 'PEAR.php';
$options = &PEAR::getStaticProperty('DB_DataObject','options');
$options['database'] = 'mysql://@localhost/test';
$options['debug_force_updates'] = TRUE;
$options['proxy'] = 'full';
$options['class_prefix'] = 'MyProject_DataObject_';
$d = new DB_DataObject;
$d->query('DROP TABLE IF EXISTS test_proxy_update');
$d->query(
"CREATE TABLE test_proxy_update (
.... PUT YOUR table def here...
)");
$t = DB_DataObject::factory('test_proxy_update');
$t->... = ....
$id = $t->insert();
$t = DB_DataObject::factory('test_proxy_update');
$t->get($id);
$t->.... = ....
$t->update();
Regards
Alan
Marcos Neves wrote:
I found how to insert and delete, but UPDATE still raising the same message: No Data specifed for query At 18:10 29/1/2004 -0200, you wrote:-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.comis it possible to UPDATE, INSERT and DELETE on a DataBaseObject created on the fly? I always get No Data specifed for query -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php