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


PHP Entry::update方法代码示例

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


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

示例1: update

 /**
  *
  */
 public function update()
 {
     global $wpdb;
     if ($this->id !== NULL) {
         parent::update();
         $wpdb->update($wpdb->prefix . $this->table_name, array('donation_amount' => $this->donation_amount), array('id' => $this->id), array('%f'), array('%d'));
     }
 }
开发者ID:TonyDeStefano,项目名称:OutSpokane-Pride-Forms,代码行数:11,代码来源:Donation.php

示例2: update

 /**
  *
  */
 public function update()
 {
     global $wpdb;
     if ($this->id !== NULL) {
         parent::update();
     }
     $wpdb->update($wpdb->prefix . $this->table_name, array('tickets_sent' => $this->wereTicketsSent() ? 1 : 0), array('id' => $this->id), array('%d'), array('%d'));
 }
开发者ID:TonyDeStefano,项目名称:OutSpokane-Pride-Forms,代码行数:11,代码来源:CruiseEntry.php

示例3: update

 /**
  *
  */
 public function update()
 {
     global $wpdb;
     if ($this->id !== NULL) {
         parent::update();
     }
     $wpdb->update($wpdb->prefix . $this->table_name, array('message' => $this->message, 'color' => $this->color), array('id' => $this->id), array('%s', '%s'), array('%d'));
 }
开发者ID:TonyDeStefano,项目名称:OutSpokane-Pride-Forms,代码行数:11,代码来源:FlagHandle.php

示例4: doPOST

 public function doPOST()
 {
     require_once DB_PATH . '/core/lib/entry.php';
     $id = intval($this->request->entry);
     try {
         $entry = new Entry($this->db, $id);
         if (!($this->auth->authenticated() && $entry->get('user') == $_SESSION['auth_id'])) {
             $entry->check_pass($_POST['password']);
         }
         $entry->update_tags($_POST['tags']);
         $entry->update('title', $_POST['title']);
         $entry->update('safe', intval($_POST['rating']));
         $entry->save();
         redirect('view', $id);
     } catch (Exception $e) {
         die($e->GetMessage());
         redirect('edit', $id);
     }
 }
开发者ID:richardmarshall,项目名称:image-dropbox,代码行数:19,代码来源:update.php

示例5: update

 /**
  *
  */
 public function update()
 {
     global $wpdb;
     if ($this->id !== NULL) {
         parent::update();
         $wpdb->update($wpdb->prefix . $this->table_name, array('amount' => $this->amount, 'position' => $this->position, 'local_position' => $this->local_position, 'local_email' => $this->local_email, 'local_phone' => $this->local_phone, 'local_first_name' => $this->local_first_name, 'local_last_name' => $this->local_last_name, 'local_address' => $this->local_address, 'local_city' => $this->local_city, 'local_state' => $this->local_state !== NULL ? substr($this->local_state, 0, 2) : NULL, 'local_zip' => $this->local_zip, 'level' => $this->level, 'url' => $this->url), array('id' => $this->id), array('%f', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s'), array('%d'));
     }
 }
开发者ID:TonyDeStefano,项目名称:OutSpokane-Pride-Forms,代码行数:11,代码来源:Sponsorship.php

示例6: update

 /**
  *
  */
 public function update()
 {
     global $wpdb;
     if ($this->id !== NULL) {
         parent::update();
     }
     $wpdb->update($wpdb->prefix . $this->table_name, array('vegetarian_qty' => $this->vegetarian_qty, 'tickets_sent' => $this->wereTicketsSent() ? 1 : 0, 'is_sponsor' => $this->isSponsor() ? 1 : 0, 'is_upgraded' => $this->isUpgraded() ? 1 : 0), array('id' => $this->id), array('%d', '%d', '%d', '%d'), array('%d'));
 }
开发者ID:TonyDeStefano,项目名称:OutSpokane-Pride-Forms,代码行数:11,代码来源:MurderMysteryEntry.php

示例7: createentry

 public function createentry($authenticated = false)
 {
     try {
         $entry = new Entry($this->db);
         $entry->update('title', $this->title);
         $entry->update('type', $this->type);
         $entry->update('size', $this->size);
         $entry->update('width', $this->width);
         $entry->update('height', $this->height);
         $entry->update('ip', $this->host);
         $entry->update('password', $this->password);
         $entry->update('safe', $this->worksafe);
         $entry->update('hash', $this->hash);
         if ($authenticated) {
             $entry->update('user', $_SESSION['auth_id']);
         }
         $nsid = $_SESSION['namespace_id'] ? $_SESSION['namespace_id'] : DB_PUBNS;
         if ($nsid != DB_PUBNS) {
             $ns = new DBNamespaces($this->db);
             if (!$ns->check_permission($nsid, $_SESSION['auth_id'], ACL_WRITE)) {
                 throw new ImageException('no permission to upload into this namespace');
             }
         }
         $entry->update('namespace', $nsid);
         $entry->save();
         $this->entryid = $entry->get_id();
         return true;
     } catch (Exception $e) {
         throw new ImageException('application error while creating entry', true);
     }
 }
开发者ID:richardmarshall,项目名称:image-dropbox,代码行数:31,代码来源:image.php

示例8: update

 /**
  *
  */
 public function update()
 {
     global $wpdb;
     if ($this->id !== NULL) {
         parent::update();
         $wpdb->update($wpdb->prefix . $this->table_name, array('entry_types' => $this->getEntryTypes(TRUE), 'float_parking_spaces' => $this->float_parking_spaces, 'float_parking_space_cost' => $this->float_parking_space_cost, 'donation_amount' => $this->donation_amount, 'description' => $this->description, 'needs_amped_sound' => $this->needs_amped_sound, 'group_size' => $this->group_size), array('id' => $this->id), array('%s', '%d', '%f', '%f', '%s', '%d', '%d'), array('%d'));
     }
 }
开发者ID:TonyDeStefano,项目名称:OutSpokane-Pride-Forms,代码行数:11,代码来源:ParadeEntry.php

示例9: update

 /**
  *
  */
 public function update()
 {
     global $wpdb;
     if ($this->id !== NULL) {
         parent::update();
         $wpdb->update($wpdb->prefix . $this->table_name, array('entry_type_id' => $this->entry_type_id, 'is_corner_booth' => $this->is_corner_booth, 'price_for_corner_booth' => $this->price_for_corner_booth, 'description' => $this->getDescription()), array('id' => $this->id), array('%d', '%d', '%f', '%s'), array('%d'));
     }
 }
开发者ID:TonyDeStefano,项目名称:OutSpokane-Pride-Forms,代码行数:11,代码来源:FestivalEntry.php


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