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


PHP XDB::update方法代碼示例

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


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

示例1: update_by_pluginvarid

 public function update_by_pluginvarid($pluginid, $pluginvarid, $data)
 {
     if (!$pluginid || !$pluginvarid || !$data || !is_array($data)) {
         return;
     }
     XDB::update($this->_table, $data, XDB::field('pluginid', $pluginid) . ' AND ' . XDB::field('pluginvarid', $pluginvarid));
 }
開發者ID:herosrx,項目名稱:shops,代碼行數:7,代碼來源:table_common_pluginvar.php

示例2: update_by_threadtableid

 public function update_by_threadtableid($threadtableid, $data, $unbuffered = false, $low_priority = false)
 {
     if (empty($data)) {
         return false;
     }
     return XDB::update($this->_table, $data, XDB::field('threadtableid', $threadtableid), $unbuffered, $low_priority);
 }
開發者ID:herosrx,項目名稱:shops,代碼行數:7,代碼來源:table_forum_forum_threadtable.php

示例3: update

 public function update($tableid, $val, $data)
 {
     if (!$data) {
         return;
     }
     return XDB::update($this->_get_table($tableid), $data, XDB::field($this->_pk, $val));
 }
開發者ID:herosrx,項目名稱:shops,代碼行數:7,代碼來源:table_forum_attachment_n.php

示例4: update_by_tid_action

 public function update_by_tid_action($tids, $action, $data)
 {
     $tids = dintval($tids, true);
     if (!empty($data) && is_array($data) && $tids) {
         return XDB::update($this->_table, $data, XDB::field('tid', $tids) . ' AND ' . XDB::field('action', $action));
     }
     return 0;
 }
開發者ID:herosrx,項目名稱:shops,代碼行數:8,代碼來源:table_forum_threadmod.php

示例5: update

 public function update($val, $data, $unbuffered = false, $low_priority = false)
 {
     if (isset($val) && !empty($data) && is_array($data)) {
         $this->checkpk();
         $ret = XDB::update($this->_table, $data, XDB::field($this->_pk, $val), $unbuffered, $low_priority);
         foreach ((array) $val as $id) {
             $this->update_cache($id, $data);
         }
         return $ret;
     }
     return !$unbuffered ? 0 : false;
 }
開發者ID:herosrx,項目名稱:shops,代碼行數:12,代碼來源:discuz_table.php

示例6: srupdate

 public function srupdate($val, $data, $condition = '', $unbuffered = false, $low_priority = false)
 {
     if (isset($val) && !empty($data) && is_array($data)) {
         $this->checkpk();
         $where = '';
         if (empty($condition)) {
             $where = XDB::field($this->_pk, $val);
         } elseif (is_array($condition)) {
             $where = XDB::field($this->_pk, $val) . ' AND ' . self::implode($condition, ' AND ');
         } else {
             $where = XDB::field($this->_pk, $val) . ' AND ' . $condition;
         }
         $ret = XDB::update($this->_table, $data, $where, $unbuffered, $low_priority);
         foreach ((array) $val as $id) {
             $this->update_cache($id, $data);
         }
         return $ret;
     }
     return !$unbuffered ? 0 : false;
 }
開發者ID:herosrx,項目名稱:shops,代碼行數:20,代碼來源:table_sanree_brand_diystyle.php

示例7: update_archive

 public function update_archive($fids)
 {
     return XDB::update('forum_forum', array('archive' => '0'), "fid NOT IN (" . dimplode($fids) . ")");
 }
開發者ID:herosrx,項目名稱:shops,代碼行數:4,代碼來源:table_forum_forum.php

示例8: fixalbum

 function fixalbum($bid, $data)
 {
     if (!is_array($data) || empty($data)) {
         return null;
     }
     $condition = array();
     $bid = dintval($bid, true);
     $condition[] = XDB::field('bid', $bid);
     return XDB::update($this->_table, $data, implode(' AND ', $condition));
 }
開發者ID:herosrx,項目名稱:shops,代碼行數:10,代碼來源:table_sanree_brand_album_category.php

示例9: update_by_bid

 public function update_by_bid($bid, $data)
 {
     return XDB::update($this->_table, $data, XDB::field('bid', $bid));
 }
開發者ID:herosrx,項目名稱:shops,代碼行數:4,代碼來源:table_sanree_brand_businesses_module.php

示例10: update_by_groupid

 public function update_by_groupid($groupid, $data)
 {
     return XDB::update($this->_table, $data, XDB::field('groupid', $groupid));
 }
開發者ID:herosrx,項目名稱:shops,代碼行數:4,代碼來源:table_sanree_brand_group_module.php

示例11: update_by_closed

 public function update_by_closed($tids, $data, $tableid = 0)
 {
     $tids = dintval($tids, true);
     if (!empty($data) && is_array($data)) {
         $num = XDB::update($this->get_table_name($tableid), $data, XDB::field('closed', $tids), true);
         if ($num) {
             foreach ((array) $tids as $tid) {
                 $this->update_cache($tid, $data, $this->_cache_ttl);
             }
         }
         return $num;
     }
     return 0;
 }
開發者ID:herosrx,項目名稱:shops,代碼行數:14,代碼來源:table_forum_thread.php

示例12: update_fid_by_fid

 public function update_fid_by_fid($tableid, $fid, $newfid, $unbuffered = false, $low_priority = false)
 {
     $where = array();
     $where[] = XDB::field('fid', $fid);
     $return = XDB::update(self::get_tablename($tableid), array('fid' => $newfid), implode(' AND ', $where), $unbuffered, $low_priority);
     if ($return && $this->_allowmem) {
         $updatefid = $this->fetch_cache('updatefid');
         $updatefid[$fid] = array('fid' => $newfid, 'dateline' => TIMESTAMP);
         $this->store_cache('updatefid', $updatefid);
     }
     return $return;
 }
開發者ID:herosrx,項目名稱:shops,代碼行數:12,代碼來源:table_forum_post.php

示例13: fix_update_block

 public function fix_update_block($hash, $data)
 {
     return XDB::update($this->_blockstyletable, $data, XDB::field('hash', $hash));
 }
開發者ID:herosrx,項目名稱:shops,代碼行數:4,代碼來源:table_sanree_brand_businesses.php


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