本文整理匯總了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>