mirror of https://github.com/itsmrval/subway
parent
9801bc99d9
commit
72ea3fed6c
|
|
@ -8,12 +8,11 @@ function getStopName($stopId) {
|
||||||
|
|
||||||
return reset($result)['fields']['nom_zda'];
|
return reset($result)['fields']['nom_zda'];
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFavorites($lineId) {
|
function getFavorites($lineId) {
|
||||||
global $conn;
|
global $conn;
|
||||||
try {
|
try {
|
||||||
$query = $conn->prepare("SELECT stopId FROM favorites WHERE lineId = ?");
|
$query = $conn->prepare("SELECT stopId FROM favorites WHERE lineId = ? AND userId = ?");
|
||||||
$query->execute([$lineId]);
|
$query->execute([$lineId, $_SESSION['user_id']]);
|
||||||
$result = $query->fetchAll(PDO::FETCH_ASSOC);
|
$result = $query->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue