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


PHP Survey::insert方法代碼示例

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


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

示例1: add_oitem_save

 public function add_oitem_save()
 {
     $id = get_post_value('id');
     $item = get_post_value('item');
     $field = array('issue_id' => $id, 'item' => $item, 'selected' => 0, 'status' => '10000', 'type' => '20000');
     $m = new Survey();
     $m->clear();
     $m->setField($field);
     $m->setTable(' vcb_survey_item ');
     $data = $m->insert();
     if (!empty($data)) {
         header("Location:add_oitem?id=" . $id);
     } else {
         header("Location:error");
     }
 }
開發者ID:koery,項目名稱:Vcanbuy,代碼行數:16,代碼來源:SurveyController.class.php

示例2: header

             $newMessages = $user->getNewMessages();
             header('Content-Type:application/json');
             echo json_encode($newMessages);
             break;
         case 'send':
             $user = new User($username);
             $check = $user->sendMessage($text);
             header('Content-Type:application/json');
             echo json_encode($check);
             break;
     }
 case 'response':
     switch ($action) {
         case 'new':
             $survey = new Survey($title, $username, $response);
             $check = $survey->insert();
             header('Content-Type:application/json');
             echo json_encode($check);
             break;
         case 'request':
             $survey = new Survey();
             $surveys = $survey->getAll();
             header('Content-Type:application/json');
             echo json_encode($surveys);
             break;
         case 'votes':
             $survey = new Survey($title);
             $votes = $survey->getVotes();
             header('Content-Type:application/json');
             echo json_encode($votes);
             break;
開發者ID:cuni0716,項目名稱:QuePassaEh,代碼行數:31,代碼來源:server.php

示例3: re_other

 private function re_other($i, $content)
 {
     $field = array('content' => $content, 'user_name' => '', 'user_ip' => $_SERVER["REMOTE_ADDR"], 'issue_id' => $i);
     $m = new Survey();
     $m->clear();
     $m->setField($field);
     $m->setTable('vcb_survey_other');
     $m->insert();
 }
開發者ID:koery,項目名稱:Vcanbuy,代碼行數:9,代碼來源:SurveyController.class.php


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