本文整理汇总了PHP中db_factory::get_table_data方法的典型用法代码示例。如果您正苦于以下问题:PHP db_factory::get_table_data方法的具体用法?PHP db_factory::get_table_data怎么用?PHP db_factory::get_table_data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类db_factory
的用法示例。
在下文中一共展示了db_factory::get_table_data方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
}
if (intval($pd)) {
$strWhere .= " and a.indus_pid = " . intval($pd);
}
if (intval($m)) {
$strWhere .= " and a.model_id = " . intval($m);
}
if (intval($p)) {
$arrCityone = CommonClass::getDistrictById($p);
$strWhere .= " and a.province = " . intval($p);
$two = db_factory::get_table_data("*", "witkey_district", "upid=" . intval($p));
}
if (intval($twoid)) {
$arrCitytwo = CommonClass::getDistrictById($twoid);
$strWhere .= " and a.city = " . intval($twoid);
$three = db_factory::get_table_data("*", "witkey_district", "upid=" . intval($twoid));
$twoid and $strUrl .= "&twoid=" . intval($twoid);
}
if (intval($threeid)) {
$arrCitythree = CommonClass::getDistrictById($threeid);
$strWhere .= " and a.area = " . intval($threeid);
}
$ky and $strWhere .= " and a.title like '%{$ky}%' ";
$intCount = db_factory::execute($strSql . $strWhere);
if (isset($o)) {
switch (intval($o)) {
case '1':
$strWhere .= " order by a.sale_num desc ";
break;
case '2':
$strWhere .= " order by a.sale_num asc ";
示例2: get_table_data
public static function get_table_data($fileds = '*', $table, $where = '', $order = '', $group = '', $limit = '', $pk = '', $cachetime = 0)
{
return db_factory::get_table_data($fileds, $table, $where, $order, $group, $limit, $pk, $cachetime);
}
示例3: 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;
}
示例4: array
<?php
$arrSidesPrimary = db_factory::get_table_data('*', 'witkey_article_category', 'cat_type = "help" and art_cat_pid = 100', 'listorder asc ', '', '', 'art_cat_id', 3600);
$arrSecondary = db_factory::get_table_data('*', 'witkey_article_category', 'cat_type = "help"', ' listorder asc ', '', '', 'art_cat_id', 3600);
$arrLastsHelp = db_factory::query('SELECT `art_id`,`art_cat_id`,`art_title` FROM `' . TABLEPRE . 'witkey_article` WHERE cat_type = "help" ORDER BY art_id desc LIMIT 0,5');
$arrCommonHelp = db_factory::query('SELECT `art_id`,`art_cat_id`,`art_title` FROM `' . TABLEPRE . 'witkey_article` WHERE cat_type = "help" ORDER BY views desc LIMIT 0,5');
$arrHotSearch = array('发布任务', '认证', '提现', '充值', '发布商品');
$id and $id = intval($id);
$Keyword = strval(trim($word));
$strUrl = "index.php?do=help";
$id and $strUrl .= "&id=" . intval($id);
$intPage and $strUrl .= "&intPage=" . intval($intPage);
$intPagesize and $strUrl .= "&intPagesize=" . intval($intPagesize);
$objArticleT = keke_table_class::get_instance('witkey_article');
$strWhere .= " cat_type = 'help' ";
$page and $intPage = intval($page);
$intPage = intval($intPage) ? $intPage : 1;
$intPagesize = intval($intPagesize) ? $intPagesize : 15;
$id && $id != '' and $strWhere .= " and art_cat_id=" . intval($id);
$Keyword and $strWhere .= " and ( art_title like '%" . trim($Keyword) . "%' or content like '%" . trim($Keyword) . "%' )";
$strWhere .= " order by art_id desc";
$arrDatas = $objArticleT->get_grid($strWhere, $strUrl, $intPage, $intPagesize, null, null, null);
$arrLists = $arrDatas['data'];
$intCount = $arrDatas['count'];
$strPages = $arrDatas['pages'];
unset($objArticleT);
if ($id) {
$arrHelpKerword = db_factory::get_one("select art_cat_pid from " . TABLEPRE . 'witkey_article_category where art_cat_id = ' . intval($id));
$arrHelpKerword = db_factory::get_one("select seo_title, seo_keyword,seo_desc from " . TABLEPRE . 'witkey_article_category where art_cat_id = ' . intval($arrHelpKerword['art_cat_pid']));
} else {
$arrHelpKerword = db_factory::get_one("select art_cat_pid from " . TABLEPRE . 'witkey_article_category where art_cat_id = 100');
示例5: getIndusById
public static function getIndusById($intIndusId)
{
return db_factory::get_table_data('*', 'witkey_industry', ' indus_pid = ' . intval($intIndusId), 'CASE WHEN listorder = 0 THEN 9999999 WHEN listorder > 0 THEN listorder END', '', '', 'indus_id', 3600);
}
示例6: defined
<?php
defined('ADMIN_KEKE') or exit('Access Denied');
$url = 'index.php?do=config&view=adddqtwo';
if ($page) {
$page = $_R['page'];
$url .= '&page=' . $page;
} else {
$page = 1;
}
if ($_R[is_submit] == 1) {
$objDistrict = keke_table_class::get_instance('witkey_district');
$arrFields = array('name' => $_R['twocity'], upid => $_R['onecity']);
$intResult = $objDistrict->save($arrFields);
kekezu::admin_show_msg("添加成功", "index.php?do=config&view=dqtwo&page=" . $page . '&id=' . $_R['ones'], 2, '', 'success');
} else {
$one = db_factory::get_table_data("*", 'witkey_district', 'upid=0');
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view);
}
示例7: unserialize
<?php
$strUrl = "index.php?do=user&view=gz&op=gy";
$arrAuthItems = keke_auth_fac_class::getAuthItemListByUid($gUid);
$arrSellerLevel = unserialize($gUserInfo['seller_level']);
$arrBuyerLevel = unserialize($gUserInfo['buyer_level']);
$floatPubTask = db_factory::query("select sum(a.fina_cash) as cash from " . TABLEPRE . "witkey_finance a left join " . TABLEPRE . "witkey_order b on a.order_id=b.order_id\n\t\t where a.uid=" . intval($gUid) . " and a.fina_action = 'pub_task' and b.order_status='ok'");
$floatBidTask = db_factory::query("select sum(fina_cash) as cash from " . TABLEPRE . "witkey_finance\n\t\t where uid=" . intval($gUid) . " and fina_action = 'task_bid' ");
$floatPayService = db_factory::query("select sum(a.fina_cash) as cash,count('a.fina_id') as count from " . TABLEPRE . "witkey_finance a left join " . TABLEPRE . "witkey_order b on a.order_id=b.order_id where a.uid=" . intval($gUid) . " and a.fina_action in ('buy_service','buy_gy') and b.order_status in ('confirm','complete')");
$floatSaleService = db_factory::query("select sum(fina_cash) as cash,count(fina_id) as count from " . TABLEPRE . "witkey_finance\n\t\t where uid=" . intval($gUid) . " and fina_action in ('sale_service','sale_gy') ");
$arrTaskModels = TaskClass::getEnabledTaskModelList();
$strModelIds = implode(',', array_keys($arrTaskModels));
$arrGoodsModels = db_factory::get_table_data('*', 'witkey_model', ' model_status = 1 and model_type = "shop" ', ' listorder asc', '', '', 'model_id', 3600);
$strServiceIds = implode(',', array_keys($arrGoodsModels));
$strModelIds and $arrTaskCount = kekezu::get_table_data('count(task_id) as count,task_status', 'witkey_task', 'uid=' . intval($gUid) . ' and task_status in (0,3) and model_id in (' . $strModelIds . ')', '', 'task_status', '', 'task_status', '');
$strServiceIds and $arrServiceWait = db_factory::query("SELECT count(a.order_id) as count FROM `" . TABLEPRE . "witkey_order` AS a LEFT JOIN " . TABLEPRE . "witkey_order_detail AS b ON a.order_id = b.order_id LEFT JOIN " . TABLEPRE . "witkey_service AS c ON b.obj_id = c.service_id WHERE 1=1 and a.seller_uid = {$uid} and c.model_id in (" . $strServiceIds . ") and b.obj_type = 'service'\n\t\t and a.order_status ='seller_confirm'");
$strServiceIds and $strServiceComp = $arrGoodsWait = db_factory::query("SELECT count(a.order_id) as count FROM `" . TABLEPRE . "witkey_order` AS a LEFT JOIN " . TABLEPRE . "witkey_order_detail AS b ON a.order_id = b.order_id LEFT JOIN " . TABLEPRE . "witkey_service AS c ON b.obj_id = c.service_id WHERE 1=1 and a.seller_uid = {$uid} and c.model_id in (" . $strServiceIds . ") and b.obj_type = 'service'\n\t\t and a.order_status ='confirm_complete'");
$arrCashCoves = TaskClass::getTaskCashCove();
$strArr = "'task_tur_bei','task_baoming_bei','buy_goods','buy_service','pub_task','gy'";
$strsqls = "select * from " . TABLEPRE . "witkey_feed where uid=" . $gUid . " and feedtype in (" . $strArr . ") order by feed_time desc limit 0,3";
$arrMyFeeds = db_factory::query($strsqls);
//var_dump($arrMyFeeds);
if ($arrMyFeeds) {
foreach ($arrMyFeeds as $key => $v) {
$arrDt = unserialize($v['title']);
//var_dump($arrDt);
if (is_array($arrDt)) {
foreach ($arrDt as $k1 => $v1) {
$arrDt[$k1] = $v1;
//var_dump($arrDt [$k1]);
}
示例8: getEnabledTaskModelList
public static function getEnabledTaskModelList()
{
return db_factory::get_table_data('*', 'witkey_model', ' model_status = 1 and model_type = "task" ', ' listorder asc', '', '', 'model_id', 3600);
}
示例9: getDistrictByPid
public static function getDistrictByPid($pid, $fields = '*')
{
$fields = strval(trim($fields));
return db_factory::get_table_data($fields, 'witkey_district', '1=1 and upid =' . intval($pid), ' displayorder asc', NULL, NULL, 'id', NULL);
}