当前位置: 首页>>代码示例>>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;未经允许,请勿转载。