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


PHP DbUtils类代码示例

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


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

示例1: getAllowVisitGids

 public static function getAllowVisitGids()
 {
     return DbUtils::getDzDbUtils(true)->queryColumn('
         SELECT groupid 
         FROM %t 
         WHERE allowvisit>0', array('common_usergroup'));
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:7,代码来源:DzCommonUserGroup.php

示例2: getActivityInvite

 public static function getActivityInvite()
 {
     return DbUtils::getDzDbUtils(true)->queryAll('
         SELECT *
         FROM %t
         ', array('appbyme_activity'));
 }
开发者ID:caidongyun,项目名称:CS,代码行数:7,代码来源:AppbymeActivityModel.php

示例3: deleteByTidUid

 public static function deleteByTidUid($tid, $uid)
 {
     return DbUtils::getDzDbUtils(true)->query('
         DELETE FROM %t
         WHERE tid=%s AND uid=%s
         ', array('forum_activityapply', $tid, $uid));
 }
开发者ID:caidongyun,项目名称:CS,代码行数:7,代码来源:DzForumActivityApply.php

示例4: getModuleParam

 public static function getModuleParam($mid)
 {
     return DbUtils::getDzDbUtils(true)->queryScalar('
         SELECT param
         FROM %t
         WHERE mid=%d
         ', array('appbyme_portal_module', $mid));
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:8,代码来源:AppbymePoralModule.php

示例5: getTidByPid

 public static function getTidByPid($pid)
 {
     return DbUtils::getDzDbUtils(true)->queryScalar('
         SELECT tid
         FROM %t
         WHERE pid = %d
         ', array('forum_post', $pid));
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:8,代码来源:ReportAction.php

示例6: getAnnouncementByUid

 public static function getAnnouncementByUid($uid)
 {
     return DbUtils::getDzDbUtils(true)->queryRow('
         SELECT * 
         FROM %t 
         WHERE id = %d
         ', array('forum_announcement', $uid));
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:8,代码来源:DzForumAnnouncement.php

示例7: generateDependentData

 protected function generateDependentData()
 {
     if ($this->sql != '') {
         return DbUtils::getDzDbUtils(true)->queryRow($this->sql, $this->params);
     } else {
         throw new CException(Yii::t('yii', 'CDbCacheDependency.sql cannot be empty.'));
     }
 }
开发者ID:caidongyun,项目名称:CS,代码行数:8,代码来源:DiscuzDbCacheDependency.php

示例8: getInfoByAuthorid

 public static function getInfoByAuthorid($authorid)
 {
     return DbUtils::getDzDbUtils(true)->queryRow('
         SELECT *
         FROM %t
         WHERE uid=%d
         ', array('common_member', $authorid));
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:8,代码来源:DzCommonMember.php

示例9: _getQQinfoByOpenId

 private function _getQQinfoByOpenId($openId)
 {
     return DbUtils::getDzDbUtils(true)->queryRow('
         SELECT *
         FROM %t
         WHERE conopenid=%s
         ', array('common_member_connect', $openId));
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:8,代码来源:QQInfoAction.php

示例10: getSupportTopicCount

 public static function getSupportTopicCount($tid)
 {
     return DbUtils::getDzDbUtils(true)->queryScalar('
         SELECT recommend_add
         FROM %t
         WHERE tid = %d
         ', array('forum_thread', $tid));
 }
开发者ID:caidongyun,项目名称:CS,代码行数:8,代码来源:DzSupportInfo.php

示例11: updateApplyNumberByTid

 public static function updateApplyNumberByTid($tid)
 {
     return DbUtils::getDzDbUtils(true)->query('
         UPDATE %t
         SET applynumber=%d
         WHERE tid=%d  
         ', array('forum_activity', DzForumActivityApply::getCountByTid($tid), $tid));
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:8,代码来源:DzForumActivity.php

示例12: updateReadStatus

 public static function updateReadStatus($uid)
 {
     DbUtils::getDzDbUtils(true)->query('
         UPDATE %t
         SET new=0
         WHERE uid=%d AND new=1
         ', array('home_notification', $uid));
 }
开发者ID:caidongyun,项目名称:CS,代码行数:8,代码来源:DzHomeNotification.php

示例13: getAPNsCertfilePassword

 public static function getAPNsCertfilePassword()
 {
     $data = DbUtils::getDzDbUtils(true)->queryScalar('
         SELECT cvalue
         FROM %t
         WHERE ckey = %s
         ', array('appbyme_config', 'certfile_apns_passphrase'));
     return (string) base64_decode($data);
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:9,代码来源:AppbymeConfig.php

示例14: getAlbumListCount

 public static function getAlbumListCount($uid)
 {
     $count = DbUtils::getDzDbUtils(true)->queryScalar('
         SELECT COUNT(*) as num
         FROM %t
         WHERE uid = %d
         ', array('home_album', $uid));
     return $count + 1;
 }
开发者ID:caidongyun,项目名称:CS,代码行数:9,代码来源:AlbumListAction.php

示例15: getUserBindInfo

 public static function getUserBindInfo($uid, $type = self::WECHAT_TYPE)
 {
     return DbUtils::getDzDbUtils(true)->queryRow('
         SELECT *
         FROM %t
         WHERE uid=%d
         AND type=%d
         ', array('appbyme_connection', $uid, $type));
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:9,代码来源:AppbymeConnection.php


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