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


PHP DbConn::executeQuery方法代码示例

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


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

示例1: checkLogin

 public static function checkLogin($userName, $password)
 {
     $sql = "select * from manager where userName='{$userName}' and password='{$password}'";
     $conn = new DbConn();
     $result = $conn->executeQuery($sql);
     $conn->close();
     return $result[0];
 }
开发者ID:xiaowanzi1204,项目名称:news,代码行数:8,代码来源:Manager.php

示例2: getNewsTypes

 public static function getNewsTypes()
 {
     $sql = "select * from newsTypes";
     $conn = new DbConn();
     $result = $conn->executeQuery($sql);
     $conn->freeResult();
     $conn->close();
     return $result;
 }
开发者ID:xiaowanzi1204,项目名称:news,代码行数:9,代码来源:NewsTypes.php

示例3: getReviews

 public static function getReviews($articleId)
 {
     $sql = "select * from reviews where articleId={$articleId}";
     $conn = new DbConn();
     $result = $conn->executeQuery($sql);
     $conn->freeResult();
     $conn->close();
     return $result;
 }
开发者ID:xiaowanzi1204,项目名称:news,代码行数:9,代码来源:Reviews.php

示例4: array

// Dateiname: public_vars.php
$PUBLICVARS = array();
/* ---------------------------------------
    Globale Variablen-Definitionen 
--------------------------------------- */
$url = parse_url(__FILE__);
$currPath = dirname($url['path']);
if (substr($currPath, strlen($currPath) - 1) != "/" && strlen($currPath) > 1) {
    $currPath .= "/";
}
include $currPath . "dbConnect.php";
$dc = new DbConn($DBHOST, $DBUSER, $DBPASS, $DBNAME);
// Muss immer neu geladen werden,
// da Session hier noch nicht gestartet werden kann weil Klassen noch nicht geladen sind!
$sql = "select name, value from pageconfig ";
$res = $dc->executeQuery($sql);
while ($row = mysql_fetch_array($res)) {
    $PUBLICVARS[$row['name']] = $row['value'];
}
class DbConn
{
    var $host;
    var $user;
    var $pass;
    var $dbname;
    var $db_link = false;
    function DbConn($DBHOST, $DBUSER, $DBPASS, $DBNAMEX)
    {
        //Konstruktor
        $this->host = $DBHOST;
        $this->user = $DBUSER;
开发者ID:CyborgOne,项目名称:cybihomecontrol_ui,代码行数:31,代码来源:public_vars.php

示例5: getNewsTwo

 public static function getNewsTwo($typeId)
 {
     $sql = "select * from newsArticles where typeId={$typeId} order by dateandtime desc limit 0,2";
     $conn = new DbConn();
     $result = $conn->executeQuery($sql);
     $conn->freeResult();
     $conn->close();
     return $result;
 }
开发者ID:xiaowanzi1204,项目名称:news,代码行数:9,代码来源:NewsArticles.php


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