當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。