mDb->StartTrans(); $this->mContentId = 0; $pDataHash['content_id'] = 0; if ( LibertyContent::store( $pDataHash ) ) { $pDataHash['contact_store']['content_id'] = $pDataHash['content_id']; $pDataHash['address_store']['content_id'] = $pDataHash['content_id']; $result = $this->mDb->associateInsert( $table, $pDataHash['contact_store'] ); // $result = $this->mDb->associateInsert( $atable, $pDataHash['address_store'] ); $this->mDb->CompleteTrans(); } else { $this->mDb->RollbackTrans(); $this->mErrors['store'] = 'Failed to store this contact.'; } return( count( $this->mErrors ) == 0 ); } /** * Delete contact object and all related records */ function ContactDataExpunge() { $ret = FALSE; $query = "DELETE FROM `".BIT_DB_PREFIX."contact`"; $result = $this->mDb->query( $query ); // $query = "DELETE FROM `".BIT_DB_PREFIX."contact_address`"; // $result = $this->mDb->query( $query ); $query = "DELETE FROM `".BIT_DB_PREFIX."contact_xref`"; $result = $this->mDb->query( $query ); return $ret; } ?>