本文整理汇总了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));
}