當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DBAccess::select方法代碼示例

本文整理匯總了PHP中DBAccess::select方法的典型用法代碼示例。如果您正苦於以下問題:PHP DBAccess::select方法的具體用法?PHP DBAccess::select怎麽用?PHP DBAccess::select使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DBAccess的用法示例。


在下文中一共展示了DBAccess::select方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getUsername

 public function getUsername()
 {
     $query = "SELECT * FROM usernames WHERE username = '" . $_POST['username'] . "'";
     $dbAccess = new DBAccess();
     $select = $dbAccess->select($query);
     return $select;
 }
開發者ID:KacosPro,項目名稱:adm-buses,代碼行數:7,代碼來源:check-username.php

示例2: getUserfullname

 public function getUserfullname($username, $password)
 {
     session_start();
     $query = "SELECT * FROM usernames WHERE username = '" . $username . "' AND Password = '" . $password . "'";
     $dbAccess = new DBAccess();
     $select = $dbAccess->select($query);
     return $select;
 }
開發者ID:KacosPro,項目名稱:adm-buses,代碼行數:8,代碼來源:user-fullname.php

示例3: getDestinationCities

 public function getDestinationCities()
 {
     $destinationCities = array();
     $query = 'SELECT DISTINCT destino FROM rutas';
     $dbAccess = new DBAccess();
     $select = $dbAccess->select($query);
     return $select;
 }
開發者ID:KacosPro,項目名稱:adm-buses,代碼行數:8,代碼來源:routes.php

示例4: DateTime

} else {
    if (isset($post['source'])) {
        $_SESSION['source'] = $post['source'];
        $_SESSION['destination'] = $post['destination'];
        $_SESSION['date'] = $post['date'];
    }
}
$source = $_SESSION['source'];
$destination = $_SESSION['destination'];
$date = $_SESSION['date'];
if (date('w', strtotime($date)) == 6 || date('w', strtotime($date)) == 0) {
    $query = "SELECT * FROM rutas where origen = '{$source}' and destino = '{$destination}' and weekend = 1";
} else {
    $query = "SELECT * FROM rutas where origen = '{$source}' and destino = '{$destination}' and weekday = 1";
}
$results = $access->select($query);
$date = new DateTime();
$date = $date->format('Y-m-d');
if (isset($_SESSION['loggedin'])) {
    $login = true;
} else {
    $login = false;
}
if ($_SESSION['wrongInfo'] == true) {
    $wrongInfo = true;
} else {
    $wrongInfo = false;
}
?>
<!DOCTYPE html>
<html>
開發者ID:KacosPro,項目名稱:adm-buses,代碼行數:31,代碼來源:schedules.php


注:本文中的DBAccess::select方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。