/* Everything is fine, so create the new vendor profile */
$defaultValues['vendor_id'] = $addVendorId;
$theNewVendor = $zcDatabase->newObject('Vendor', $defaultValues);
if ($theNewVendor->save()): /* Everything is fine, so create the new vendor profile */
$defaultValues['vendor_id'] = $addVendorId;
$theNewVendor = $zcDatabase->newObject('Vendor');
foreach ($defaultValues as $theCol => $theValue):
$theNewVendor->set($theCol, $theValue);
endforeach;
if ($theNewVendor->save()):
This question has been answered by BobRay. See the first response.
$theNewVendor = $zcDatabase->newObject('Vendor');
$theNewVendor->fromArray(array(
'vendor' => $addVendorId,
));
if ($theNewVendor->save()):$theNewVendor = $zcDatabase->newObject('Vendor');
$theNewVendor->fromArray(array(
'vendor' => $addVendorId,
), "", false, true);
if ($theNewVendor->save()):$theNewVendor = $zcDatabase->newObject('Vendor');
$theNewVendor->fromArray($defaultValues, "", false, true);
if ($theNewVendor->save()){
/* Something here */
}