/** * Deletes all associated QueryConditions * @return void */ public function DeleteAllQueryConditions() { if (is_null($this->intId)) { throw new QUndefinedPrimaryKeyException('Unable to call UnassociateQueryCondition on this unsaved QueryNode.'); } // Get the Database Object for this Class $objDatabase = QueryNode::GetDatabase(); // Journaling if ($objDatabase->JournalingDatabase) { foreach (QueryCondition::LoadArrayByQueryNodeId($this->intId) as $objQueryCondition) { $objQueryCondition->Journal('DELETE'); } } // Perform the SQL Query $objDatabase->NonQuery(' DELETE FROM `query_condition` WHERE `query_node_id` = ' . $objDatabase->SqlVariable($this->intId) . ' '); }