當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。