当前位置: 首页>>代码示例>>PHP>>正文


PHP DBUtils::query方法代码示例

本文整理汇总了PHP中DBUtils::query方法的典型用法代码示例。如果您正苦于以下问题:PHP DBUtils::query方法的具体用法?PHP DBUtils::query怎么用?PHP DBUtils::query使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DBUtils的用法示例。


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

示例1: getList

 public static function getList($teacherId)
 {
     $pdo = new DBUtils();
     $sql = "select * from teacherDes where teacherId = '{$teacherId}'";
     $rs = $pdo->query($sql);
     return $rs;
 }
开发者ID:zcmyworld,项目名称:nothing,代码行数:7,代码来源:mod_teacher.php

示例2: getList

 public static function getList($snavId)
 {
     $pdo = new DBUtils();
     $sql = "select * from article where snavId = {$snavId}";
     $rs = $pdo->query($sql);
     return $rs;
 }
开发者ID:zcmyworld,项目名称:nothing,代码行数:7,代码来源:mod_article.php

示例3: getBuyList

 public static function getBuyList()
 {
     $pdo = new DBUtils();
     $sql = "select * from buy";
     $rs = $pdo->query($sql);
     return $rs;
 }
开发者ID:zcmyworld,项目名称:nothing,代码行数:7,代码来源:mod_buy.php

示例4: getIndex

 public static function getIndex()
 {
     $pdo = new DBUtils();
     $sql = "select * from homepage";
     $rs = $pdo->query($sql);
     return $rs;
 }
开发者ID:zcmyworld,项目名称:nothing,代码行数:7,代码来源:mod_index.php

示例5: getNav

function getNav()
{
    $pdo = new DBUtils();
    $sql = "select * from nav";
    $nav = $pdo->query($sql);
    $header = array();
    foreach ($nav as $key => $val) {
        $header[$val['navId']] = array("navName" => $val['navName'], "navId" => $val['navId'], "second" => array());
    }
    $sql = "select * from second_nav";
    $second = $pdo->query($sql);
    foreach ($second as $key => $val) {
        $header[$val['navId']]['second'][$val['snavId']] = array("snavName" => $val['snavName'], "snavId" => $val['snavId'], "link" => $val['snavName']);
    }
    return $header;
}
开发者ID:zcmyworld,项目名称:nothing,代码行数:16,代码来源:index.php

示例6: getAdviceList

 public static function getAdviceList()
 {
     $pdo = new DBUtils();
     $sql = "select * from advice";
     $rs = $pdo->query($sql);
     return $rs;
 }
开发者ID:zcmyworld,项目名称:nothing,代码行数:7,代码来源:mod_advice.php

示例7: getJoinusList

 public static function getJoinusList()
 {
     $pdo = new DBUtils();
     $sql = "select * from joinus";
     $rs = $pdo->query($sql);
     return $rs;
 }
开发者ID:zcmyworld,项目名称:nothing,代码行数:7,代码来源:mod_joinus.php

示例8: getStudentReportList

 public static function getStudentReportList($type)
 {
     $pdo = new DBUtils();
     $sql = "select * from student_report where type = '{$type}'";
     $rs = $pdo->query($sql);
     return $rs;
 }
开发者ID:zcmyworld,项目名称:nothing,代码行数:7,代码来源:mod_thanks.php

示例9: getOne

 public static function getOne($courseId)
 {
     $pdo = new DBUtils();
     $sql = "select * from course where courseId = {$courseId}";
     $course = $pdo->getOne($sql);
     $sql = "select * from courseType where courseId = {$courseId}";
     $courseType = $pdo->query($sql);
     return array("course" => $course, "courseType" => $courseType);
 }
开发者ID:zcmyworld,项目名称:nothing,代码行数:9,代码来源:mod_course.php

示例10: json_encode

<?php

header("Content-Type:text/html;charset=utf-8");
include_once "config/dbconfig.php";
include_once "utils/dbutils.php";
$mysql = new DBUtils();
$sql = "SELECT * from articles";
$mysql->query($sql);
$qInfo = array();
if ($mysql->getResultSize() == 0) {
    $qInfo['isSuccess'] = false;
} else {
    $qInfo['isSuccess'] = true;
    $qInfo['responseText'] = $mysql->getResultSet();
}
echo json_encode($qInfo);
开发者ID:overkazaf,项目名称:ncg,代码行数:16,代码来源:queryArticles.php


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