• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_result函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_result函数的典型用法代码示例。如果您正苦于以下问题:PHP get_result函数的具体用法?PHP get_result怎么用?PHP get_result使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_result函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: index

 public function index($language_id = 2)
 {
     $map = array('language_id' => $language_id);
     $result = get_result('location_description', $map);
     $continent = array();
     $country = array();
     $city = array();
     $location_id = array();
     foreach ($result as $row) {
         if ($row['continent'] == '') {
             continue;
         }
         $continent[$row['continent']] = $row['continent'];
         $country[$row['continent']][] = $row['country'];
         $city[$row['country']][] = $row['city'];
         $location_id[$row['city']] = $row['location_id'];
     }
     $new_country = array();
     foreach ($continent as $row) {
         $new_country[$row] = array_unique($country[$row]);
     }
     $data['continent_json'] = json_encode($continent);
     $data['country_json'] = json_encode($new_country);
     $data['city_json'] = json_encode($city);
     $data['location_id'] = json_encode($location_id);
     $this->assign($data);
     $this->display(T('Common@Widget/Location/index'));
 }
开发者ID:jkzleond,项目名称:alhelp_api,代码行数:28,代码来源:LocationWidget.class.php


示例2: index

 public function index($product_id, $Month = '', $moudel = '')
 {
     if (!$product_id) {
         $product_id = 0;
     }
     $map['product_id'] = $product_id;
     $result = get_result('product_price', $map);
     if ($Month) {
         $Montht = $Month;
     } else {
         $Montht = date('Y-m-d');
     }
     $Monthts = date('t', strtotime($Montht));
     foreach ($result as $k => $row) {
         $data[] = array('id' => $row['id'], 'title' => $row['type1_price'], 'start' => date('Y-m-d', $row['day']), 'name' => date('Y-m-d H:i', $row['day']), 'textColor' => '#0FDECF');
     }
     for ($im = 1; $im <= $Monthts; $im++) {
         $map['day'] = strtotime(date('Y-m-d', $row['day']));
         $description_info = get_info('product_description', $map);
         if ($description_info) {
             $data[] = array('id' => $description_info['id'], 'title' => $row['type1_price'], 'start' => date('Y-m-d', $description_info['day']), 'name' => date('Y-m-d H:i', $description_info['day']), 'textColor' => '#0FDECF');
         } else {
             $data[] = array('id' => '0', 'title' => '设定价格', 'start' => date('Y-m', strtotime($Montht)) . "-" . $im, 'name' => date('Y-m', strtotime($Montht)) . "-" . $im, 'textColor' => '#0FDECF');
         }
     }
     $datas['data'] = json_encode($data);
     $this->assign($map);
     $this->assign($datas);
     $this->display(T('Common@Widget/ProductPrice/index'));
 }
开发者ID:jkzleond,项目名称:alhelp_api,代码行数:30,代码来源:ProductPriceWidget.class.php


示例3: fetch_comments_unit

function fetch_comments_unit($unitId)
{
    global $mysqli;
    $sql = 'SELECT Comments.id, (DATE_FORMAT(commentTime,  "%d.%m.%Y %H:%i:%s")) as time,name as user,comment, IFNULL(SUM(isPositive),0) as positive, IFNULL(COUNT(isPositive)-SUM(isPositive),0) as negative, CommentAnswers.answerTo as answerTo,
		IFNULL((SELECT (isPositive-1)+isPositive FROM CommentRating WHERE id=Comments.id AND userId=?),0) as voted
                					FROM Comments
                					    LEFT JOIN UserData
                        					ON Comments.userId=UserData.Id
                        				LEFT JOIN CommentRating
                        					ON Comments.id=CommentRating.id
                        				LEFT JOIN CommentAnswers
                                			ON CommentAnswers.id=Comments.id
                       					WHERE unitId=?
                        				GROUP BY Comments.id';
    $stmt = $mysqli->prepare($sql);
    $stmt->bind_param('ii', $userId, $unitId);
    $stmt->execute();
    $result = array();
    $comment = get_result($stmt);
    while ($stmt->fetch()) {
        $result[] = $comment;
        $comment = get_result($stmt);
    }
    $stmt->fetch();
    $stmt->close();
    return $result;
}
开发者ID:RobinLinus,项目名称:capira-api,代码行数:27,代码来源:comment.php


示例4: read_invitations

function read_invitations()
{
    global $TABLE_PREFIX, $admintpl, $language, $CURUSER, $STYLEPATH, $btit_settings;
    $scriptname = htmlspecialchars($_SERVER["PHP_SELF"] . "?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=invitations");
    $addparam = "";
    $res = get_result("SELECT COUNT(*) as invites FROM {$TABLE_PREFIX}invitations", true);
    $count = $res[0]["invites"];
    list($pagertop, $pagerbottom, $limit) = pager('15', $count, $scriptname . "&amp;");
    $admintpl->set("inv_pagertop", $pagertop);
    $admintpl->set("inv_pagerbottom", $pagerbottom);
    $results = get_result("SELECT * FROM {$TABLE_PREFIX}invitations ORDER BY id DESC {$limit}", true);
    $invitees = array();
    $i = 0;
    foreach ($results as $id => $data) {
        $res = do_sqlquery("SELECT username FROM {$TABLE_PREFIX}users WHERE id = " . $data["inviter"], true);
        if (mysql_num_rows($res) > 0) {
            $inviter_name = mysql_result($res, 0, 0);
        } else {
            $inviter_name = 'Unknown';
        }
        $invitees[$i]["inviter"] = "<a href=\"index.php?page=userdetails&amp;user=" . $data["inviter"] . "\">" . $inviter_name . "</a>";
        $invitees[$i]["invitee"] = unesc($data["invitee"]);
        $invitees[$i]["hash"] = unesc($data["hash"]);
        $invitees[$i]["time_invited"] = $data["time_invited"];
        $invitees[$i]["delete"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=invitations&amp;action=delete&amp;id=" . $data["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
        $i++;
    }
    $admintpl->set("invitees", $invitees);
    $admintpl->set("language", $language);
}
开发者ID:r4kib,项目名称:cyberfun-xbtit,代码行数:30,代码来源:admin.invitations.php


示例5: index

 public function index($currency = '')
 {
     $data['result'] = get_result('currency');
     $data['currency'] = $currency;
     $this->assign($data);
     $this->display(T('Common@Widget/Currency/index'));
 }
开发者ID:jkzleond,项目名称:alhelp_api,代码行数:7,代码来源:CurrencyWidget.class.php


示例6: index

 /**
  *帮助中心主页
  *	显示关于N邦的帮助文章
  *流程分析
  *	1、将页面中的菜单查询出来并显示
  *	2、要求是用户在后台添加的时候前台能够自动显示出来菜单并显示到页面中
  **/
 public function index()
 {
     $article_id = I('id');
     /* 获取分类列表 */
     $help_category_cath = array_id_key(get_help_category_cache());
     $category_ids = array();
     foreach ($help_category_cath as $row) {
         $category_ids[] = $row['id'];
     }
     /* 获取分类下的所有文章 */
     $map = null;
     $map['status'] = 1;
     $map['category_id'] = array('in', $category_ids);
     $articles = get_result($this->table, $map);
     /* 获去当前显示的文章 */
     if ($article_id) {
         $map['id'] = $article_id;
         $map['status'] = 1;
         $cur_article = get_info($this->table, $map);
     } else {
         $cur_article = $articles[0];
     }
     $data['help_category_cath'] = $help_category_cath;
     $data['articles'] = $articles;
     $data['cur_article'] = $cur_article;
     $this->assign($data);
     $this->display();
 }
开发者ID:976112643,项目名称:manor,代码行数:35,代码来源:HelpController.class.php


示例7: ca_mois

function ca_mois($mois, $annee, $jour, $pourc = 100, $port = 1)
{
    global $cnx;
    if ($jour != "%") {
        $jour = sprintf("%02d", $jour);
    }
    if ($mois != "%") {
        $mois = sprintf("%02d", $mois);
    }
    if ($annee != "%") {
        $annee = sprintf("%04d", $annee);
    }
    $date = "{$annee}-{$mois}-{$jour}";
    $query = "select * from " . Commande::TABLE . " where statut >= " . Commande::PAYE . " and statut <> " . Commande::ANNULE . " and datefact like '{$date}'";
    $resul = $cnx->query($query);
    $list = array();
    while ($resul && ($row = $cnx->fetch_object($resul))) {
        $list[] = $row->id;
    }
    if (count($list) == 0) {
        $list = '0';
    } else {
        $list = implode(',', $list);
    }
    $ca = round(get_result("SELECT sum(quantite*prixu) as camois FROM " . Venteprod::TABLE . " where commande in ({$list})"), 2);
    $ca += get_result("SELECT sum(port) as port FROM " . Commande::TABLE . " where id in ({$list})");
    $ca -= get_result("SELECT sum(remise) as remise FROM " . Commande::TABLE . " where id in ({$list})");
    if (!$port) {
        $ca -= get_result("SELECT sum(port) as port FROM " . Commande::TABLE . " where id in ({$list})");
    }
    return round($ca * $pourc / 100, 2);
}
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:32,代码来源:graph.php


示例8: index

 /**
  *我的脚印
  *	显示店铺经营的一些数据统计
  *		1、店铺中交易成功的金额
  *		2、翻译的字数统计
  *		3、口译小时数统计
  *		4、音频翻译分钟数统计
  **/
 public function index()
 {
     $apptype = (!empty(I('post.apptype')) and I('post.apptype') == C('APP_KEY')) ? true : false;
     //手机app接口密钥
     if ($apptype) {
         $app_key = trim(I("post.key"));
         //md5加密的登录时间
         $member_id = I("post.home_member_id");
         $this->isLoginExpire($app_key, $member_id);
         //判断登录过期
     } else {
         $member_id = session('home_member_id');
     }
     //查询出来属于这个店铺的订单的数据
     //$map['member_id'] = $member_id;
     $map = array('member_id' => $member_id, 'status' => array(in, array(3, 6, 7)));
     $shop_order_data = get_result($this->table, $map);
     //处理数据
     $shop_data = $this->shop_data($shop_order_data);
     if ($apptype) {
         $this->ajaxReturn($shop_data);
     }
     $this->assign($shop_data);
     $this->display();
 }
开发者ID:976112643,项目名称:manor,代码行数:33,代码来源:MyTrackController.class.php


示例9: view

 public function view()
 {
     if (!isset($_SESSION["autorised"])) {
         header('Location: ' . $_SESSION['base_url'] . '/home');
     }
     include_once "/../models/model_test.php";
     $result = get_result(-1, $_SESSION['user_id']);
     include_once "/../pages/result.php";
 }
开发者ID:sasha2567,项目名称:rabota,代码行数:9,代码来源:result.php


示例10: completedProjectDetailofUser

 public function completedProjectDetailofUser($userid, $from, $to)
 {
     global $dblink;
     $v = $dblink->prepare("SELECT * FROM project WHERE userid=? AND status='1' ORDER BY id DESC LIMIT ?,?");
     $v->bind_param("iii", $userid, $from, $to);
     $v->execute();
     $data = get_result($v);
     return $data;
 }
开发者ID:KunalGautam,项目名称:-dev-null,代码行数:9,代码来源:ProjectView.class.php


示例11: search

 public function search($emailid)
 {
     global $dblink;
     $v = $dblink->prepare("SELECT * FROM user WHERE email=? or username=?");
     $v->bind_param("ss", $emailid, $emailid);
     $v->execute();
     $result = get_result($v);
     return $result;
 }
开发者ID:KunalGautam,项目名称:-dev-null,代码行数:9,代码来源:ProfileSave.class.php


示例12: getUserInfo

 private function getUserInfo($id)
 {
     global $dblink;
     $v = $dblink->prepare("SELECT * FROM user WHERE id=?");
     $v->bind_param("i", $id);
     $v->execute();
     $result = get_result($v);
     return $result;
 }
开发者ID:KunalGautam,项目名称:-dev-null,代码行数:9,代码来源:DisplayUserInfo.class.php


示例13: index

 public function index($action, $parameter = array(), $language_id = '')
 {
     $data['result'] = get_result('language');
     $data['action'] = $action;
     $data['parameter'] = $parameter;
     $data['language_id'] = $language_id;
     $this->assign($data);
     $this->display(T('Common@Widget/Language/index'));
 }
开发者ID:jkzleond,项目名称:alhelp_api,代码行数:9,代码来源:StoreWidget.class.php


示例14: listBidsforUser

 public function listBidsforUser($userid, $from, $to)
 {
     global $dblink;
     $v = $dblink->prepare("SELECT * FROM project_bid WHERE userid=? ORDER BY ID DESC LIMIT ?,?");
     $v->bind_param("iii", $userid, $from, $to);
     $v->execute();
     $result = get_result($v);
     return $result;
 }
开发者ID:KunalGautam,项目名称:-dev-null,代码行数:9,代码来源:Bid.class.php


示例15: listar

 public function listar($cod_situacao = null)
 {
     $query = $this->query();
     if (!is_null($cod_situacao)) {
         $query .= " WHERE cod_situacao = '" . do_escape($cod_situacao) . "' ";
     }
     $query .= " ORDER BY nome ";
     return get_result($query);
 }
开发者ID:landim32,项目名称:escola-bem-me-quer,代码行数:9,代码来源:Escola.inc.php


示例16: main_menu

function main_menu()
{
    global $TABLE_PREFIX, $CURUSER, $tpl;
    $blocks = get_result('SELECT content FROM ' . $TABLE_PREFIX . 'blocks WHERE position="t" AND status=1 AND ' . $CURUSER['id_level'] . '>=minclassview  AND ' . $CURUSER['id_level'] . '<=maxclassview ' . ($FORUMLINK == '' || $FORUMLINK == 'internal' || substr($FORUMLINK, 0, 3) == 'smf' || $FORUMLINK == 'ipb' ? '' : ' AND content!="forum"') . ' ORDER BY sortid', true, $CACHE_DURATION);
    $return = '';
    foreach ($blocks as $entry) {
        $return .= get_content(realpath(dirname(__FILE__) . '/..') . '/blocks/' . $entry['content'] . '_block.php');
    }
    return set_block('', 'justify', $return);
}
开发者ID:Karpec,项目名称:gizd,代码行数:10,代码来源:blocks.php


示例17: user_with_color

function user_with_color($username, $prefix = NULL, $suffix = NULL)
{
    global $TABLE_PREFIX;
    if (isset($prefix) && isset($suffix)) {
        return unesc($prefix . $username . $suffix);
    } else {
        // get cached version for the user (prefix and suffix)
        $rps = get_result("SELECT prefixcolor,suffixcolor FROM {$TABLE_PREFIX}users u INNER JOIN {$TABLE_PREFIX}users_level ul ON u.id_level=ul.id WHERE u.username=" . sqlesc($username) . "", false, 0);
        return unesc($rps[0]['prefixcolor'] . $username . $rps[0]['suffixcolor']);
    }
}
开发者ID:Karpec,项目名称:gizd,代码行数:11,代码来源:users.functions.php


示例18: listar

 public function listar()
 {
     $query = $this->query() . $this->groupby();
     //echo $query;
     $retorno = array();
     $cidades = get_result($query);
     foreach ($cidades as $cidade) {
         $retorno[] = $this->atualizar($cidade);
     }
     return $retorno;
 }
开发者ID:landim32,项目名称:dungeon-blazer,代码行数:11,代码来源:Cidade.inc.php


示例19: ability

 public function ability()
 {
     $map['type'] = '2';
     $pid = I('pid') ? I('pid') : 0;
     $map['pid'] = $pid;
     $map['status'] = array('gt', '-1');
     $result = get_result($this->table, $map);
     $data['result'] = $result;
     $this->assign($data);
     $this->display('index');
 }
开发者ID:976112643,项目名称:manor,代码行数:11,代码来源:CategoryController.class.php


示例20: catData

 public function catData($id)
 {
     global $dblink;
     $v = $dblink->prepare("SELECT * FROM category WHERE id=?");
     $v->bind_param("i", $id);
     $v->execute();
     $result = get_result($v);
     foreach ($result as $value) {
         return $value;
     }
 }
开发者ID:KunalGautam,项目名称:-dev-null,代码行数:11,代码来源:DisplayCat.class.php



注:本文中的get_result函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_return_url函数代码示例发布时间:2022-05-15
下一篇:
PHP get_rest_url函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap