本文整理匯總了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'));
}
示例2: getActivityInvite
public static function getActivityInvite()
{
return DbUtils::getDzDbUtils(true)->queryAll('
SELECT *
FROM %t
', array('appbyme_activity'));
}
示例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));
}
示例4: getModuleParam
public static function getModuleParam($mid)
{
return DbUtils::getDzDbUtils(true)->queryScalar('
SELECT param
FROM %t
WHERE mid=%d
', array('appbyme_portal_module', $mid));
}
示例5: getTidByPid
public static function getTidByPid($pid)
{
return DbUtils::getDzDbUtils(true)->queryScalar('
SELECT tid
FROM %t
WHERE pid = %d
', array('forum_post', $pid));
}
示例6: getAnnouncementByUid
public static function getAnnouncementByUid($uid)
{
return DbUtils::getDzDbUtils(true)->queryRow('
SELECT *
FROM %t
WHERE id = %d
', array('forum_announcement', $uid));
}
示例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.'));
}
}
示例8: getInfoByAuthorid
public static function getInfoByAuthorid($authorid)
{
return DbUtils::getDzDbUtils(true)->queryRow('
SELECT *
FROM %t
WHERE uid=%d
', array('common_member', $authorid));
}
示例9: _getQQinfoByOpenId
private function _getQQinfoByOpenId($openId)
{
return DbUtils::getDzDbUtils(true)->queryRow('
SELECT *
FROM %t
WHERE conopenid=%s
', array('common_member_connect', $openId));
}
示例10: getSupportTopicCount
public static function getSupportTopicCount($tid)
{
return DbUtils::getDzDbUtils(true)->queryScalar('
SELECT recommend_add
FROM %t
WHERE tid = %d
', array('forum_thread', $tid));
}
示例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));
}
示例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));
}
示例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);
}
示例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;
}
示例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));
}