當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Campaign::mark_deleted方法代碼示例

本文整理匯總了PHP中Campaign::mark_deleted方法的典型用法代碼示例。如果您正苦於以下問題:PHP Campaign::mark_deleted方法的具體用法?PHP Campaign::mark_deleted怎麽用?PHP Campaign::mark_deleted使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Campaign的用法示例。


在下文中一共展示了Campaign::mark_deleted方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testSaveAndMarkDeleted

 public function testSaveAndMarkDeleted()
 {
     $campaign = new Campaign();
     $campaign->name = 'test';
     $campaign->amount = 100;
     $campaign->save();
     //test for record ID to verify that record is saved
     $this->assertTrue(isset($campaign->id));
     $this->assertEquals(36, strlen($campaign->id));
     //mark the record as deleted and verify that this record cannot be retrieved anymore.
     $campaign->mark_deleted($campaign->id);
     $result = $campaign->retrieve($campaign->id);
     $this->assertEquals(null, $result);
 }
開發者ID:recci,項目名稱:SuiteCRM,代碼行數:14,代碼來源:CampaignTest.php

示例2:

        $query .= "inner join prospect_lists on campaign_log.list_id = prospect_lists.id and prospect_lists.list_type='test' ";
        $query .= "set emails.deleted=1 ";
    } else {
    }
    $focus->db->query($query);
    //delete from message queue.
    if ($focus->db->dbType == 'mysql') {
        $query = "delete emailman.* from emailman ";
        $query .= "inner join prospect_lists on emailman.list_id = prospect_lists.id and prospect_lists.list_type='test' ";
        $query .= "WHERE emailman.campaign_id = '{$focus->id}' ";
    } else {
    }
    $focus->db->query($query);
    //delete from campaign_log
    if ($focus->db->dbType == 'mysql') {
        $query = "update  campaign_log ";
        $query .= "inner join prospect_lists on campaign_log.list_id = prospect_lists.id and prospect_lists.list_type='test' ";
        $query .= "set campaign_log.deleted=1 ";
        $query .= "where campaign_log.campaign_id='{$focus->id}' ";
    } else {
    }
    $focus->db->query($query);
} else {
    if (!$focus->ACLAccess('Delete')) {
        ACLController::displayNoAccess(true);
        sugar_cleanup(true);
    }
    $focus->mark_deleted($_REQUEST['record']);
}
$return_id = !empty($_REQUEST['return_id']) ? $_REQUEST['return_id'] : $focus->id;
header("Location: index.php?module=" . $_REQUEST['return_module'] . "&action=" . $_REQUEST['return_action'] . "&record=" . $return_id);
開發者ID:BackupTheBerlios,項目名稱:livealphaprint,代碼行數:31,代碼來源:Delete.php


注:本文中的Campaign::mark_deleted方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。