本文整理汇总了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;
}
示例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;
}
示例3: getDestinationCities
public function getDestinationCities()
{
$destinationCities = array();
$query = 'SELECT DISTINCT destino FROM rutas';
$dbAccess = new DBAccess();
$select = $dbAccess->select($query);
return $select;
}
示例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>