当前位置: 首页>>代码示例>>PHP>>正文


PHP JDatabaseDriver::insertid方法代码示例

本文整理汇总了PHP中JDatabaseDriver::insertid方法的典型用法代码示例。如果您正苦于以下问题:PHP JDatabaseDriver::insertid方法的具体用法?PHP JDatabaseDriver::insertid怎么用?PHP JDatabaseDriver::insertid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JDatabaseDriver的用法示例。


在下文中一共展示了JDatabaseDriver::insertid方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: insertObject

 protected function insertObject()
 {
     $query = $this->db->getQuery(true);
     $query->insert($this->db->quoteName("#__vc_paymentsessions"))->set($this->db->quoteName("user_id") . "=" . (int) $this->user_id)->set($this->db->quoteName("currency_id") . "=" . (int) $this->currency_id)->set($this->db->quoteName("amount") . "=" . $this->db->quote($this->amount));
     $this->db->setQuery($query);
     $this->db->execute();
     $this->id = $this->db->insertid();
 }
开发者ID:bellodox,项目名称:VirtualCurrency,代码行数:8,代码来源:session.php

示例2: insertObject

 protected function insertObject()
 {
     $query = $this->db->getQuery(true);
     $query->insert($this->db->quoteName("#__crowdf_rewards"))->set($this->db->quoteName("title") . "=" . $this->db->quote($this->title))->set($this->db->quoteName("description") . "=" . $this->db->quote($this->description))->set($this->db->quoteName("amount") . "=" . $this->db->quote($this->amount))->set($this->db->quoteName("number") . "=" . (int) $this->number)->set($this->db->quoteName("distributed") . "=" . (int) $this->distributed)->set($this->db->quoteName("delivery") . "=" . $this->db->quote($this->delivery))->set($this->db->quoteName("shipping") . "=" . $this->db->quote($this->shipping))->set($this->db->quoteName("image") . "=" . $this->db->quote($this->image))->set($this->db->quoteName("image_thumb") . "=" . $this->db->quote($this->image_thumb))->set($this->db->quoteName("image_square") . "=" . $this->db->quote($this->image_square))->set($this->db->quoteName("published") . "=" . $this->db->quote($this->published))->set($this->db->quoteName("project_id") . "=" . (int) $this->project_id);
     $this->db->setQuery($query);
     $this->db->execute();
     $this->id = $this->db->insertid();
 }
开发者ID:phpsource,项目名称:CrowdFunding,代码行数:8,代码来源:reward.php

示例3: insertObject

 protected function insertObject()
 {
     $recordDate = !$this->record_date ? "NULL" : $this->db->quote($this->record_date);
     $query = $this->db->getQuery(true);
     $query->insert($this->db->quoteName("#__crowdf_payment_sessions"))->set($this->db->quoteName("user_id") . "=" . $this->db->quote($this->user_id))->set($this->db->quoteName("project_id") . "=" . $this->db->quote($this->project_id))->set($this->db->quoteName("reward_id") . "=" . $this->db->quote($this->reward_id))->set($this->db->quoteName("record_date") . "=" . $recordDate)->set($this->db->quoteName("txn_id") . "=" . $this->db->quote($this->txn_id))->set($this->db->quoteName("token") . "=" . $this->db->quote($this->token))->set($this->db->quoteName("gateway") . "=" . $this->db->quote($this->gateway))->set($this->db->quoteName("auser_id") . "=" . $this->db->quote($this->auser_id))->set($this->db->quoteName("intention_id") . "=" . $this->db->quote($this->intention_id));
     $this->db->setQuery($query);
     $this->db->execute();
     $this->id = $this->db->insertid();
 }
开发者ID:phpsource,项目名称:CrowdFunding,代码行数:9,代码来源:session.php

示例4: insertObject

 protected function insertObject()
 {
     $created = !$this->created ? "NULL" : $this->db->quote($this->created);
     $query = $this->db->getQuery(true);
     $query->insert($this->db->quoteName("#__crowdf_projects"))->set($this->db->quoteName("title") . "=" . $this->db->quote($this->title))->set($this->db->quoteName("alias") . "=" . $this->db->quote($this->alias))->set($this->db->quoteName("short_desc") . "=" . $this->db->quote($this->short_desc))->set($this->db->quoteName("description") . "=" . $this->db->quote($this->description))->set($this->db->quoteName("image") . "=" . $this->db->quote($this->image))->set($this->db->quoteName("image_square") . "=" . $this->db->quote($this->image_square))->set($this->db->quoteName("image_small") . "=" . $this->db->quote($this->image_small))->set($this->db->quoteName("location") . "=" . $this->db->quote($this->location))->set($this->db->quoteName("goal") . "=" . $this->db->quote($this->goal))->set($this->db->quoteName("funded") . "=" . $this->db->quote($this->funded))->set($this->db->quoteName("funding_type") . "=" . $this->db->quote($this->funding_type))->set($this->db->quoteName("funding_start") . "=" . $this->db->quote($this->funding_start))->set($this->db->quoteName("funding_end") . "=" . $this->db->quote($this->funding_end))->set($this->db->quoteName("funding_days") . "=" . $this->db->quote($this->funding_days))->set($this->db->quoteName("pitch_video") . "=" . $this->db->quote($this->pitch_video))->set($this->db->quoteName("pitch_image") . "=" . $this->db->quote($this->pitch_image))->set($this->db->quoteName("hits") . "=" . (int) $this->hits)->set($this->db->quoteName("created") . "=" . $created)->set($this->db->quoteName("featured") . "=" . $this->db->quote($this->featured))->set($this->db->quoteName("published") . "=" . $this->db->quote($this->published))->set($this->db->quoteName("approved") . "=" . $this->db->quote($this->approved))->set($this->db->quoteName("ordering") . "=" . $this->db->quote($this->ordering))->set($this->db->quoteName("catid") . "=" . (int) $this->catid)->set($this->db->quoteName("type_id") . "=" . (int) $this->type_id)->set($this->db->quoteName("user_id") . "=" . (int) $this->user_id);
     $this->db->setQuery($query);
     $this->db->execute();
     $this->id = $this->db->insertid();
 }
开发者ID:phpsource,项目名称:CrowdFunding,代码行数:9,代码来源:project.php

示例5: insertObject

 protected function insertObject()
 {
     $txnDate = !$this->txn_date ? "NULL" : $this->db->quote($this->txn_date);
     $query = $this->db->getQuery(true);
     $query->insert($this->db->quoteName("#__vc_transactions"))->set($this->db->quoteName("units") . "=" . $this->db->quote($this->units))->set($this->db->quoteName("txn_id") . "=" . $this->db->quote($this->txn_id))->set($this->db->quoteName("txn_amount") . "=" . $this->db->quote($this->txn_amount))->set($this->db->quoteName("txn_currency") . "=" . $this->db->quote($this->txn_currency))->set($this->db->quoteName("txn_status") . "=" . $this->db->quote($this->txn_status))->set($this->db->quoteName("txn_date") . "=" . $txnDate)->set($this->db->quoteName("service_provider") . "=" . $this->db->quote($this->service_provider))->set($this->db->quoteName("currency_id") . "=" . $this->db->quote($this->currency_id))->set($this->db->quoteName("sender_id") . "=" . $this->db->quote($this->sender_id))->set($this->db->quoteName("receiver_id") . "=" . $this->db->quote($this->receiver_id));
     $this->db->setQuery($query);
     $this->db->execute();
     $this->id = $this->db->insertid();
 }
开发者ID:bellodox,项目名称:VirtualCurrency,代码行数:9,代码来源:transaction.php

示例6: insertObject

 protected function insertObject()
 {
     $note = !$this->note ? "NULL" : $this->db->quote($this->note);
     $query = $this->db->getQuery(true);
     $query->insert($this->db->quoteName("#__vc_accounts"))->set($this->db->quoteName("amount") . "=" . $this->db->quote($this->amount))->set($this->db->quoteName("note") . "=" . $note)->set($this->db->quoteName("user_id") . "=" . (int) $this->user_id)->set($this->db->quoteName("currency_id") . "=" . (int) $this->currency_id);
     $this->db->setQuery($query);
     $this->db->execute();
     $this->id = $this->db->insertid();
 }
开发者ID:bellodox,项目名称:VirtualCurrency,代码行数:9,代码来源:account.php

示例7: insertObject

 protected function insertObject()
 {
     $description = !$this->description ? "NULL" : $this->db->quote($this->description);
     $params = !$this->params ? "NULL" : $this->db->quote($this->params);
     $query = $this->db->getQuery(true);
     $query->insert($this->db->quoteName("#__vc_currencies"))->set($this->db->quoteName("title") . "=" . $this->db->quote($this->title))->set($this->db->quoteName("description") . "=" . $description)->set($this->db->quoteName("code") . "=" . (int) $this->code)->set($this->db->quoteName("symbol") . "=" . (int) $this->symbol)->set($this->db->quoteName("params") . "=" . $params);
     $this->db->setQuery($query);
     $this->db->execute();
     $this->id = $this->db->insertid();
 }
开发者ID:bellodox,项目名称:VirtualCurrency,代码行数:10,代码来源:currency.php

示例8: insertObject

 protected function insertObject()
 {
     // Prepare extra data value.
     $extraData = !$this->extra_data ? "NULL" : $this->db->quote($this->extra_data);
     $txnDate = !$this->txn_date ? "NULL" : $this->db->quote($this->txn_date);
     $query = $this->db->getQuery(true);
     $query->insert($this->db->quoteName("#__crowdf_transactions"))->set($this->db->quoteName("txn_date") . "=" . $txnDate)->set($this->db->quoteName("txn_amount") . "=" . $this->db->quote($this->txn_amount))->set($this->db->quoteName("txn_currency") . "=" . $this->db->quote($this->txn_currency))->set($this->db->quoteName("txn_status") . "=" . $this->db->quote($this->txn_status))->set($this->db->quoteName("txn_id") . "=" . $this->db->quote($this->txn_id))->set($this->db->quoteName("parent_txn_id") . "=" . $this->db->quote($this->parent_txn_id))->set($this->db->quoteName("extra_data") . "=" . $extraData)->set($this->db->quoteName("status_reason") . "=" . $this->db->quote($this->status_reason))->set($this->db->quoteName("project_id") . "=" . $this->db->quote($this->project_id))->set($this->db->quoteName("reward_id") . "=" . $this->db->quote($this->reward_id))->set($this->db->quoteName("investor_id") . "=" . $this->db->quote($this->investor_id))->set($this->db->quoteName("receiver_id") . "=" . $this->db->quote($this->receiver_id))->set($this->db->quoteName("service_provider") . "=" . $this->db->quote($this->service_provider))->set($this->db->quoteName("reward_state") . "=" . $this->db->quote($this->reward_state));
     $this->db->setQuery($query);
     $this->db->execute();
     $this->id = $this->db->insertid();
 }
开发者ID:phpsource,项目名称:CrowdFunding,代码行数:11,代码来源:transaction.php

示例9: store

 /**
  * Store information about activity.
  *
  * <code>
  * $userId = 1;
  * $content = "...";
  *
  * $activity = new Prism\Integration\Activity\JomSocial($userId, $content);
  * $activity->setDb(JFactory::getDbo());
  * $activity->store();
  * </code>
  *
  * @throws \RuntimeException
  */
 public function store()
 {
     if (!$this->app) {
         throw new \RuntimeException(\JText::_('LIB_PRISM_ERROR_INVALID_JOMSOCIAL_APP'));
     }
     $query = $this->db->getQuery(true);
     $date = new \JDate();
     $query->insert($this->db->quoteName('#__community_activities'))->set($this->db->quoteName('actor') . '=' . (int) $this->actorId)->set($this->db->quoteName('content') . '=' . $this->db->quote($this->content))->set($this->db->quoteName('archived') . '=' . $this->db->quote($this->archived))->set($this->db->quoteName('app') . '=' . $this->db->quote($this->app))->set($this->db->quoteName('created') . '=' . $this->db->quote($date->toSql()));
     $this->db->setQuery($query);
     $this->db->execute();
     // Get the ID of the record.
     $this->id = $this->db->insertid();
 }
开发者ID:bellodox,项目名称:PrismLibrary,代码行数:27,代码来源:JomSocial.php

示例10: store

 /**
  * Store information about activity.
  *
  * <code>
  * $userId = 1;
  * $content = "...";
  *
  * $activity = new ITPrismIntegrateActivityJomSocial($userId, $content);
  * $activity->setDb(JFactory::getDbo());
  * $activity->store();
  * </code>
  *
  * @param string $content
  *
  * @throws Exception
  */
 public function store($content = "")
 {
     if (!empty($content)) {
         $this->content = $content;
     }
     if (!$this->app) {
         throw new Exception(JText::_("LIB_ITPRISM_ERROR_INVALID_JOMSOCIAL_APP"));
     }
     $query = $this->db->getQuery(true);
     $date = new JDate();
     $query->insert("#__community_activities")->set($this->db->quoteName("actor") . "=" . (int) $this->actorId)->set($this->db->quoteName("content") . "=" . $this->db->quote($this->content))->set($this->db->quoteName("archived") . "=" . $this->db->quote($this->archived))->set($this->db->quoteName("app") . "=" . $this->db->quote($this->app))->set($this->db->quoteName("created") . "=" . $this->db->quote($date->toSql()));
     $this->db->setQuery($query);
     $this->db->execute();
     // Get the ID of the record.
     $this->id = $this->db->insertid();
 }
开发者ID:johngrange,项目名称:wookeyholeweb,代码行数:32,代码来源:jomsocial.php

示例11: send

 /**
  * Store a notification to database.
  *
  * <code>
  * $userId = 1;
  * $content = "....";
  *
  * $notification = new ITPrismIntegrateNotificationEasySocial($userId, $content);
  * $notification->setDb(JFactory::getDbo());
  *
  * $notification->send();
  * </code>
  *
  * @param string $content
  */
 public function send($content = "")
 {
     if (!empty($content)) {
         $this->content = $content;
     }
     $query = $this->db->getQuery(true);
     $date = new JDate();
     $query->insert($this->db->quoteName("#__social_notifications"))->set($this->db->quoteName("uid") . "=" . (int) $this->uid)->set($this->db->quoteName("actor_id") . "=" . (int) $this->actorId)->set($this->db->quoteName("actor_type") . "=" . $this->db->quote($this->actorType))->set($this->db->quoteName("target_id") . "=" . (int) $this->targetId)->set($this->db->quoteName("target_type") . "=" . $this->db->quote($this->targetType))->set($this->db->quoteName("content") . "=" . $this->db->quote($this->content))->set($this->db->quoteName("cmd") . "=" . $this->db->quote($this->cmd))->set($this->db->quoteName("type") . "=" . $this->db->quote($this->type))->set($this->db->quoteName("url") . "=" . $this->db->quote($this->url))->set($this->db->quoteName("state") . "=" . (int) $this->state)->set($this->db->quoteName("created") . "=" . $this->db->quote($date->toSql()));
     if (!empty($this->image)) {
         $query->set($this->db->quoteName("image") . "=" . $this->db->quote($this->image));
     }
     if (!empty($this->title)) {
         $query->set($this->db->quoteName("title") . "=" . $this->db->quote($this->title));
     }
     $this->db->setQuery($query);
     $this->db->execute();
     $this->id = $this->db->insertid();
 }
开发者ID:johngrange,项目名称:wookeyholeweb,代码行数:33,代码来源:easysocial.php

示例12: send

 /**
  * Store a notification to database.
  *
  * <code>
  * $userId = 1;
  * $content = "....";
  *
  * $notification = new Prism\Integration\Notification\EasySocial($userId, $content);
  * $notification->setDb(JFactory::getDbo());
  *
  * $notification->send();
  * </code>
  *
  * @param string $content
  */
 public function send($content = '')
 {
     if (\JString::strlen($content) > 0) {
         $this->content = $content;
     }
     $query = $this->db->getQuery(true);
     $date = new \JDate();
     $query->insert($this->db->quoteName('#__social_notifications'))->set($this->db->quoteName('uid') . '=' . (int) $this->uid)->set($this->db->quoteName('actor_id') . '=' . (int) $this->actorId)->set($this->db->quoteName('actor_type') . '=' . $this->db->quote($this->actorType))->set($this->db->quoteName('target_id') . '=' . (int) $this->targetId)->set($this->db->quoteName('target_type') . '=' . $this->db->quote($this->targetType))->set($this->db->quoteName('content') . '=' . $this->db->quote($this->content))->set($this->db->quoteName('cmd') . '=' . $this->db->quote($this->cmd))->set($this->db->quoteName('type') . '=' . $this->db->quote($this->type))->set($this->db->quoteName('url') . '=' . $this->db->quote($this->url))->set($this->db->quoteName('state') . '=' . (int) $this->state)->set($this->db->quoteName('created') . '=' . $this->db->quote($date->toSql()));
     if ($this->image !== null) {
         $query->set($this->db->quoteName('image') . '=' . $this->db->quote($this->image));
     }
     if ($this->title !== null) {
         $query->set($this->db->quoteName('title') . '=' . $this->db->quote($this->title));
     }
     $this->db->setQuery($query);
     $this->db->execute();
     $this->id = $this->db->insertid();
 }
开发者ID:bellodox,项目名称:PrismLibrary,代码行数:33,代码来源:EasySocial.php

示例13: insertObject

 protected function insertObject()
 {
     $filename = !$this->filename ? "NULL" : $this->db->quote($this->filename);
     $private = !$this->private ? "NULL" : $this->db->quote($this->private);
     $public = !$this->public ? "NULL" : $this->db->quote($this->public);
     $note = !$this->note ? "NULL" : $this->db->quote($this->note);
     if (!$this->meta_data) {
         $metaData = "NULL";
     } else {
         if (is_array($this->meta_data)) {
             $metaData = json_encode($this->meta_data);
             $metaData = $this->db->quote($metaData);
         } else {
             $metaData = $this->db->quote($this->meta_data);
         }
     }
     $query = $this->db->getQuery(true);
     $query->insert($this->db->quoteName("#__identityproof_files"))->set($this->db->quoteName("title") . "=" . $this->db->quote($this->title))->set($this->db->quoteName("filename") . "=" . $filename)->set($this->db->quoteName("private") . "=" . $private)->set($this->db->quoteName("public") . "=" . $public)->set($this->db->quoteName("meta_data") . "=" . $metaData)->set($this->db->quoteName("state") . "=" . $this->db->quote($this->state))->set($this->db->quoteName("note") . "=" . $note)->set($this->db->quoteName("user_id") . "=" . (int) $this->user_id);
     $this->db->setQuery($query);
     $this->db->execute();
     $this->id = $this->db->insertid();
 }
开发者ID:xop32,项目名称:Proof-of-Identity,代码行数:22,代码来源:file.php

示例14: send

 /**
  * Store a notification to database.
  *
  * <code>
  * $userId = 1;
  * $content = "....";
  *
  * $notification = new ITPrismIntegrateNotificationJomSocial($userId, $content);
  * $notification->setDb(JFactory::getDbo());
  *
  * $notification->send();
  * </code>
  *
  * @param string $content
  */
 public function send($content = "")
 {
     if (!empty($content)) {
         $this->content = $content;
     }
     $query = $this->db->getQuery(true);
     if (!empty($this->image)) {
         $params["image"] = $this->image;
     }
     if (!empty($this->url)) {
         $params["url"] = $this->url;
     }
     $date = new JDate();
     $query->insert($this->db->quoteName("#__community_notifications"))->set($this->db->quoteName("actor") . "=" . (int) $this->actorId)->set($this->db->quoteName("target") . "=" . (int) $this->targetId)->set($this->db->quoteName("content") . "=" . $this->db->quote($this->content))->set($this->db->quoteName("cmd_type") . "=" . $this->db->quote($this->cmdType))->set($this->db->quoteName("type") . "=" . $this->db->quote($this->type))->set($this->db->quoteName("status") . "=" . (int) $this->status)->set($this->db->quoteName("created") . "=" . $this->db->quote($date->toSql()));
     if (!empty($params)) {
         $params = json_encode($params);
         $query->set($this->db->quoteName("params") . "=" . $this->db->quote($params));
     }
     $this->db->setQuery($query);
     $this->db->execute();
     $this->id = $this->db->insertid();
 }
开发者ID:johngrange,项目名称:wookeyholeweb,代码行数:37,代码来源:jomsocial.php

示例15: send

 /**
  * Store a notification to database.
  *
  * <code>
  * $userId = 1;
  * $content = "....";
  *
  * $notification = new Prism\Integration\Notification\JomSocial($userId, $content);
  * $notification->setDb(\JFactory::getDbo());
  *
  * $notification->send();
  * </code>
  *
  * @param string $content
  */
 public function send($content = '')
 {
     if (\JString::strlen($content) > 0) {
         $this->content = $content;
     }
     $query = $this->db->getQuery(true);
     $params = array();
     if ($this->image !== null) {
         $params['image'] = $this->image;
     }
     if ($this->url !== null) {
         $params['url'] = $this->url;
     }
     $date = new \JDate();
     $query->insert($this->db->quoteName('#__community_notifications'))->set($this->db->quoteName('actor') . '=' . (int) $this->actorId)->set($this->db->quoteName('target') . '=' . (int) $this->targetId)->set($this->db->quoteName('content') . '=' . $this->db->quote($this->content))->set($this->db->quoteName('cmd_type') . '=' . $this->db->quote($this->cmdType))->set($this->db->quoteName('type') . '=' . $this->db->quote($this->type))->set($this->db->quoteName('status') . '=' . (int) $this->status)->set($this->db->quoteName('created') . '=' . $this->db->quote($date->toSql()));
     if (count($params) > 0) {
         $params = json_encode($params);
         $query->set($this->db->quoteName('params') . '=' . $this->db->quote($params));
     }
     $this->db->setQuery($query);
     $this->db->execute();
     $this->id = $this->db->insertid();
 }
开发者ID:bellodox,项目名称:PrismLibrary,代码行数:38,代码来源:JomSocial.php


注:本文中的JDatabaseDriver::insertid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。