DataObject setFrom() problem
| From: | William | Date: | Thu, 01 Aug 2002 11:04:46 +0000 |
| Subject: | DataObject setFrom() problem | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-2021@lists.php.net to get a copy of this message | ||
Hi,
I have problem during using the DataObjects->setFrom() function.
I can use it to copy data from an Array like $person->setFrom($_POST);
However, when I want to copy from another object, nothing happened.
My coding is:
$productB = new DataObjects_Product;
$productB->get($productid);
$product = new DataObjects_Product;
$product->setFrom($productB);
$id = $product->insert();
The result is $product returns a blank DataObjects_Product without any data from $productB, am I
using it right?
Cheers,
William