当前位置: 首页>>代码示例>>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;未经允许,请勿转载。