/** * Deletes an associated StewardshipPostLineItem * @param StewardshipPostLineItem $objStewardshipPostLineItem * @return void */ public function DeleteAssociatedStewardshipPostLineItem(StewardshipPostLineItem $objStewardshipPostLineItem) { if (is_null($this->intId)) { throw new QUndefinedPrimaryKeyException('Unable to call UnassociateStewardshipPostLineItem on this unsaved StewardshipPost.'); } if (is_null($objStewardshipPostLineItem->Id)) { throw new QUndefinedPrimaryKeyException('Unable to call UnassociateStewardshipPostLineItem on this StewardshipPost with an unsaved StewardshipPostLineItem.'); } // Get the Database Object for this Class $objDatabase = StewardshipPost::GetDatabase(); // Perform the SQL Query $objDatabase->NonQuery(' DELETE FROM `stewardship_post_line_item` WHERE `id` = ' . $objDatabase->SqlVariable($objStewardshipPostLineItem->Id) . ' AND `stewardship_post_id` = ' . $objDatabase->SqlVariable($this->intId) . ' '); // Journaling if ($objDatabase->JournalingDatabase) { $objStewardshipPostLineItem->Journal('DELETE'); } }