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


PHP CampaignDbTables::getTableName_Anken方法代碼示例

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


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

示例1: CampaignDbTables

    /**
     * 提攜メディアリストを取得します。
     * @param string キャンペーンコード
     * @param array  検索條件
     * @param string 単価タイプ
     * @return array 提攜メディアリスト
     */
    public function &Anken_TeikeiIndex_getAnkenTeikeiList($code, $like, $priceTypeCd)
    {
        $db =& $this->_core->getDB();
        $tables = new CampaignDbTables($code);
        $teikeiAnkenStatus = $like['teikei_media_status'];
        $hatena = str_repeat('?,', count($teikeiAnkenStatus));
        $hatena = trim($hatena, ',');
        $name_media = $tables->getTableName_Media();
        $name_anken = $tables->getTableName_Anken();
        $param = array();
        $where = "";
        if (empty($teikeiAnkenStatus) == false) {
            $where .= " and CA.nyuko_status in ({$hatena}) ";
            if (in_array(0, $teikeiAnkenStatus) == true) {
                $where .= " or CA.nyuko_status is null ";
            }
            $param = $teikeiAnkenStatus;
        }
        $sql = <<<SQL
select
CM.teikei_media_id,
C.media_company_id,
C.media_company_name,
M.media_id,
M.media_name,
CM.media_url,
CM.price,
CM.oroshi_price,
CM.teikei_from,
CM.teikei_to,
CM.extra_price,
CM.extra_oroshi,
CA.anken_send_flg,
CA.nyuko_send_flg,
CA.media_test_flg,
CA.keisai_test_flg,
CA.keisai_end_flg,
CA.anken_finish_flg,
CASE WHEN CA.nyuko_status is null THEN '0' ELSE CA.nyuko_status END as nyuko_status
from {$name_media} as CM
left join {$name_anken} as CA
on CM.teikei_media_id = CA.teikei_media_id
left join ald_anken_genko as G
on CM.anken_id = G.anken_id

inner join ald_media as M
on CM.media_id = M.media_id
inner join ald_media_company as C
on C.media_company_id = M.media_company_id
where 1
{$where}
order by CM.teikei_media_id
SQL;
        return $db->query($sql, $param);
    }
開發者ID:,項目名稱:,代碼行數:62,代碼來源:


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