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


PHP DB::field方法代码示例

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


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

示例1: update_by_id_username

 public function update_by_id_username($id, $data, $username, $adminid = 1)
 {
     if (($id = dintval($id, true)) && $data && is_array($data)) {
         $adminid = dintval($adminid);
         DB::update($this->_table, $data, DB::field($this->_pk, $id) . " AND ('{$adminid}'=1 OR " . DB::field('author', $username) . ')', true);
     }
 }
开发者ID:softhui,项目名称:discuz,代码行数:7,代码来源:table_forum_announcement.php

示例2: count_by_access

 public function count_by_access($access)
 {
     if (!is_numeric($access) && !is_array($access)) {
         return 0;
     }
     return DB::result_first('SELECT COUNT(*) FROM %t WHERE ' . DB::field('access', $access), array($this->_table));
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:7,代码来源:table_common_adminnote.php

示例3: delete_by_touid

 public function delete_by_touid($touids)
 {
     if (empty($touids)) {
         return false;
     }
     return DB::query('DELETE FROM mc, mq USING %t AS mc, %t AS mq WHERE mc.' . DB::field('touid', $touids) . ' AND mc.cid=mq.cid', array($this->_table, 'common_mailqueue'), false, true);
 }
开发者ID:softhui,项目名称:discuz,代码行数:7,代码来源:table_common_mailcron.php

示例4: delete_by_pid

 public function delete_by_pid($pids)
 {
     if (empty($pids)) {
         return false;
     }
     return DB::query('DELETE FROM %t WHERE ' . DB::field('pid', $pids), array($this->_table), false, true);
 }
开发者ID:softhui,项目名称:discuz,代码行数:7,代码来源:table_forum_warning.php

示例5: delete

 public function delete($id, $uid = 0)
 {
     if (empty($id)) {
         return false;
     }
     return DB::query('DELETE FROM %t WHERE ' . DB::field('id', $id) . ' %i', array($this->_table, $uid ? ' AND ' . DB::field('uid', $uid) : ''));
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:7,代码来源:table_common_admincp_cmenu.php

示例6: delete_by_tid

 public function delete_by_tid($tids)
 {
     if (!$tids) {
         return;
     }
     return DB::delete($this->_table, DB::field('tid', $tids));
 }
开发者ID:softhui,项目名称:discuz,代码行数:7,代码来源:table_forum_debate.php

示例7: delete_by_identifier

 public function delete_by_identifier($identifier)
 {
     if (!$identifier) {
         return;
     }
     DB::delete('common_plugin', DB::field('identifier', $identifier));
 }
开发者ID:huming17,项目名称:dzmvc,代码行数:7,代码来源:table_common_plugin.php

示例8: fetch_all_by_uid

 public function fetch_all_by_uid($uid, $new, $type, $start, $perpage)
 {
     $new = intval($new);
     $type = $type ? ' AND ' . DB::field('type', $type) : '';
     $new = ' AND ' . DB::field('new', $new);
     return DB::fetch_all("SELECT * FROM %t WHERE uid=%d %i %i ORDER BY new DESC, dateline DESC %i", array($this->_table, $uid, $type, $new, DB::limit($start, $perpage)));
 }
开发者ID:dalinhuang,项目名称:healthshop,代码行数:7,代码来源:table_home_notification.php

示例9: fetch_all_by_name

 public function fetch_all_by_name($name)
 {
     if (!empty($name)) {
         return DB::fetch_all('SELECT * FROM %t WHERE ' . DB::field('name', $name), array($this->_table));
     }
     return array();
 }
开发者ID:druphliu,项目名称:dzzoffice,代码行数:7,代码来源:table_district.php

示例10: fetch_all_by_doid

 public function fetch_all_by_doid($doids)
 {
     if (empty($doids)) {
         return array();
     }
     return DB::fetch_all('SELECT * FROM %t WHERE ' . DB::field('doid', $doids) . ' ORDER BY dateline', array($this->_table));
 }
开发者ID:softhui,项目名称:discuz,代码行数:7,代码来源:table_home_docomment.php

示例11: delete_by_dateline

 public function delete_by_dateline($dateline)
 {
     if (!is_numeric($dateline)) {
         return false;
     }
     return DB::delete($this->_table, DB::field('dateline', $dateline, '<='));
 }
开发者ID:lemonstory,项目名称:bbs,代码行数:7,代码来源:table_forum_collectioninvite.php

示例12: update_by_scriptname

 public function update_by_scriptname($scriptname, $data)
 {
     if (!$data || !is_array($data)) {
         return;
     }
     DB::update($this->_table, $data, DB::field('scriptname', $scriptname));
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:7,代码来源:table_common_task.php

示例13: update_by_typeid

 public function update_by_typeid($typeid, $data)
 {
     if (($typeid = dintval($typeid, true)) && !empty($data) && is_array($data)) {
         return DB::update($this->_table, $data, DB::field('typeid', $typeid));
     }
     return false;
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:7,代码来源:table_common_card.php

示例14: delete

 public function delete($id) {
     if(!$id) {
         return "学院删除失败,id为空!";
     }
     DB::delete($this->_table, DB::field('id', $id));
     return "学院删除成功!";
 }
开发者ID:pigzee,项目名称:book_back,代码行数:7,代码来源:table_book_college.php

示例15: update

 public function update($ctid, $uid, $data, $unbuffered = false, $low_priority = false)
 {
     if (!empty($data) && is_array($data) && $ctid && $uid) {
         return DB::update($this->_table, $data, DB::field('ctid', $ctid) . ' AND ' . DB::field('uid', $uid), $unbuffered, $low_priority);
     }
     return !$unbuffered ? 0 : false;
 }
开发者ID:softhui,项目名称:discuz,代码行数:7,代码来源:table_forum_collectionteamworker.php


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