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


PHP Lead::unsetAttributes方法代碼示例

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


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

示例1: actionUseradmin

    public function actionUseradmin()
    {
        $user_id = Yii::app()->user->id;
        $model = new Lead('search');
        $model->unsetAttributes();
        if (isset($_POST['property_exists'])) {
            echo "hello";
            $user_id = Yii::app()->user->id;
            $sta = 1;
            $sts = 2;
            $stt = 3;
            $stf = 4;
            $p_id = $_POST['property_exists'];
            Yii::app()->SESSION['p_id'] = $_POST['property_exists'];
            $data = Yii::app()->db->createCommand('select  m.propert_name, 							s.organisation_name,s.phone_1,s.email_id,s.message,s.id,s.enquiry_source,s.status,s.first_name from tbl_lead_fields s
		join tbl_lead_users mr on mr.leads_id=s.id
		join tbl_propery_details m on m.id=s.property_id
		where mr.user_id="' . $user_id . '" and s.status="' . $sta . '" and s.property_id="' . $p_id . '"')->queryAll();
            $inst = Yii::app()->db->createCommand('select  m.propert_name, 							s.organisation_name,s.phone_1,s.email_id,s.message,s.id,s.enquiry_source,s.status,s.first_name from tbl_lead_fields s
		join tbl_lead_users mr on mr.leads_id=s.id
		join tbl_propery_details m on m.id=s.property_id
		where mr.user_id="' . $user_id . '" and s.status="' . $sts . '" and s.property_id="' . $p_id . '"')->queryAll();
            $instbn = Yii::app()->db->createCommand('select  m.propert_name, 							s.organisation_name,s.phone_1,s.email_id,s.message,s.id,s.enquiry_source,s.status,s.first_name from tbl_lead_fields s
		join tbl_lead_users mr on mr.leads_id=s.id
		join tbl_propery_details m on m.id=s.property_id
		where mr.user_id="' . $user_id . '" and s.status="' . $stt . '" and s.property_id="' . $p_id . '"')->queryAll();
            $sad = Yii::app()->db->createCommand('select  m.propert_name, 							s.organisation_name,s.phone_1,s.email_id,s.message,s.id,s.enquiry_source,s.status,s.first_name from tbl_lead_fields s
		join tbl_lead_users mr on mr.leads_id=s.id
		join tbl_propery_details m on m.id=s.property_id
		where mr.user_id="' . $user_id . '" and s.status="' . $stf . '" and s.property_id="' . $p_id . '"')->queryAll();
        } else {
            $user_id = Yii::app()->user->id;
            $sta = 1;
            $sts = 2;
            $stt = 3;
            $stf = 4;
            $data = Yii::app()->db->createCommand('select  m.propert_name, 							s.organisation_name,s.phone_1,s.email_id,s.message,s.id,s.enquiry_source,s.status,s.first_name from tbl_lead_fields s
		join tbl_lead_users mr on mr.leads_id=s.id
		join tbl_propery_details m on m.id=s.property_id
		where mr.user_id="' . $user_id . '" and s.status="' . $sta . '"')->queryAll();
            $inst = Yii::app()->db->createCommand('select  m.propert_name, 							s.organisation_name,s.phone_1,s.email_id,s.message,s.id,s.enquiry_source,s.status,s.first_name from tbl_lead_fields s
		join tbl_lead_users mr on mr.leads_id=s.id
		join tbl_propery_details m on m.id=s.property_id
		where mr.user_id="' . $user_id . '" and s.status="' . $sts . '"')->queryAll();
            $instbn = Yii::app()->db->createCommand('select  m.propert_name, 							s.organisation_name,s.phone_1,s.email_id,s.message,s.id,s.enquiry_source,s.status,s.first_name from tbl_lead_fields s
		join tbl_lead_users mr on mr.leads_id=s.id
		join tbl_propery_details m on m.id=s.property_id
		where mr.user_id="' . $user_id . '" and s.status="' . $stt . '"')->queryAll();
            $sad = Yii::app()->db->createCommand('select  m.propert_name, 							s.organisation_name,s.phone_1,s.email_id,s.message,s.id,s.enquiry_source,s.status,s.first_name from tbl_lead_fields s
		join tbl_lead_users mr on mr.leads_id=s.id
		join tbl_propery_details m on m.id=s.property_id
		where mr.user_id="' . $user_id . '" and s.status="' . $stf . '"')->queryAll();
        }
        // clear any default values
        if (isset($_GET['Lead'])) {
            $model->attributes = $_GET['Lead'];
        }
        $this->render('admin', array('model' => $model, 'datamodel' => $data, 'insts' => $inst, 'instt' => $instbn, 'sads' => $sad));
    }
開發者ID:aftavwani,項目名稱:Master,代碼行數:59,代碼來源:LeadController.php


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