->insert not working with DB_DataObject

From: Date: Mon, 26 Apr 2004 14:50:28 +0000
Subject: ->insert not working with DB_DataObject
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12127@lists.php.net to get a copy of this message
I've had to downgrade from the latest DB_DataObject to version 1.4 as the latest one requires PHP4.2 and the server I've just uploaded a site to only has 4.1. Note that the dependencies for the latest version are listed as PHP4.1 but the code uses is_a(), this is slightly misleading. I've had to change quite a large portion of the code, for example rewriting ->get($id) to ->get("id", $id) as it appears the older version doesn't use autonumber fields by default. However, my ->insert() and ->update fields don't work any more. The code I have is: $category = new ShopCategory(); $category->name = "FOO"; $category->description = "BAR"; $category->insert(); Using if I can test that $category->insert() is actually returning FALSE but I am unsure how to get any more information from PEAR. Does anybody have any idea why the code doesn't work? Looking back at tutorials and the source for DataObject.php it seems that it should still work with this slightly older version. David

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