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


PHP dao::inster方法代碼示例

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


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

示例1: addMe

 public function addMe($nick, $password, $email, $name)
 {
     $dao = new dao();
     $product = array("nick" => $nick, "password" => $password, "email" => $email, "name" => $name);
     try {
         $returnObject = $dao->inster($product, "product");
     } catch (Exception $e) {
         throw new Exception("Failed product addMe: " . $e->getMessage());
     }
     return $this->addData($returnObject);
 }
開發者ID:andreseloysv,項目名稱:happy,代碼行數:11,代碼來源:productController.php

示例2: addMe

 public function addMe($nick, $password, $email, $name)
 {
     $dao = new dao();
     $club = array("email" => $email, "name" => $name);
     try {
         $returnObject = $dao->inster($club, "club");
     } catch (Exception $e) {
         throw new Exception("Failed club addMe: " . $e->getMessage());
     }
     return $this->addData($returnObject);
 }
開發者ID:andreseloysv,項目名稱:happy,代碼行數:11,代碼來源:club.php

示例3: addMe

 public function addMe($id_event, $id_product, $id_user, $date_ini)
 {
     $dao = new dao();
     $product = array("id_event" => $id_event, "id_product" => $id_product, "id_user" => $id_user, "date_ini" => $date_ini);
     try {
         $returnObject = $dao->inster($product, "product");
     } catch (Exception $e) {
         throw new Exception("Failed product addMe: " . $e->getMessage());
     }
     return $this->addData($returnObject);
 }
開發者ID:andreseloysv,項目名稱:happy,代碼行數:11,代碼來源:productEventUserController.php

示例4: inviteFriend

 public function inviteFriend($user_id, $event_id)
 {
     $dao = new dao();
     $event_user = array("id_event" => $event_id, "id_user" => $user_id);
     try {
         $dao->inster($event_user, "event_user");
         return $event_user;
     } catch (Exception $e) {
         throw new Exception("Failed event_user addMe: " . $e->getMessage());
     }
 }
開發者ID:andreseloysv,項目名稱:happy,代碼行數:11,代碼來源:eventController.php

示例5: post

 public function post($user_id, $coment, $media)
 {
     $timestamp = new DateTime();
     $id_post = hash('md5', $timestamp->getTimestamp() . $user_id);
     $dao = new dao();
     $post = array("id_post" => $id_post, "coment" => $coment, "media" => $media);
     $post_user = array("id_user" => $user_id, "id_post" => $id_post);
     try {
         $returnObject = $dao->inster($post, "post");
         $returnObject = $dao->inster($post_user, "post_user");
         return $returnObject;
     } catch (Exception $e) {
         throw new Exception("Failed conecting posting " . $wantToFollow_id . " Message: " . $e->getMessage());
     }
 }
開發者ID:andreseloysv,項目名稱:happy,代碼行數:15,代碼來源:userController.php


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