Subsequent fixes after major changes for PDO
This commit is contained in:
@@ -13,7 +13,7 @@ $location_id = sanitize($_GET['location_id']);
|
||||
|
||||
include("header.php");
|
||||
|
||||
$sql = "SELECT location_name FROM location WHERE location_id=?";
|
||||
$sql = "SELECT location_id AS id, location_name AS name FROM location WHERE location_id=?";
|
||||
$sth = $dbh->prepare($sql);
|
||||
$sth->execute([$location_id]);
|
||||
$smarty->assign("location", $sth->fetch(PDO::FETCH_OBJ));
|
||||
|
||||
Reference in New Issue
Block a user