本文整理匯總了PHP中db_factory::checkTableIsExists方法的典型用法代碼示例。如果您正苦於以下問題:PHP db_factory::checkTableIsExists方法的具體用法?PHP db_factory::checkTableIsExists怎麽用?PHP db_factory::checkTableIsExists使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類db_factory
的用法示例。
在下文中一共展示了db_factory::checkTableIsExists方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getAuthItemListByUid
public static function getAuthItemListByUid($uid)
{
$userinfo = kekezu::get_user_info($uid);
if (!$userinfo) {
return false;
}
if ($userinfo['user_type']) {
$userinfo['user_type'] == '2' and $remove_item = 'realname' or $remove_item = 'enterprise';
} else {
$remove_item = '';
}
$items = db_factory::get_table_data("*", "witkey_auth_item", " auth_open = '1' AND auth_code NOT IN('{$remove_item}') ", " CASE WHEN listorder >0 THEN 1 ELSE 0 END DESC ", "", "", "auth_code", 3600);
if (!$items) {
return false;
}
$records = db_factory::get_table_data("*", "witkey_auth_record", " uid = '{$uid}' AND auth_status = '1' AND auth_code NOT IN('{$remove_item}') ", "", "", "", "auth_code", 3600);
foreach ($items as $authcode => $iteminfo) {
$auth_record_status = $records[$authcode]['auth_status'] ? 1 : 0;
$auth_item_status = 0;
if ($auth_record_status) {
$tablename = TABLEPRE . 'witkey_auth_' . $authcode;
$isExists = db_factory::checkTableIsExists($tablename);
if ($isExists) {
$info = db_factory::get_one("SELECT * FROM `{$tablename}` WHERE uid = '{$uid}' AND auth_status = '1'");
if ($info) {
$auth_item_status = 1;
}
}
}
if ($auth_record_status && $auth_item_status) {
$items[$authcode]['auth_pass'] = 1;
} else {
$items[$authcode]['auth_pass'] = 0;
}
$items[$authcode]['auth_url'] = "index.php?do=user&view=account&op=auth&code={$authcode}";
}
return $items;
}