Changed database access to PDO using prepared statements
This commit is contained in:
14
location.php
14
location.php
@@ -11,15 +11,11 @@ include("includes.php");
|
||||
|
||||
include("header.php");
|
||||
|
||||
$query = "SELECT
|
||||
location_id AS id,
|
||||
location_name AS value,
|
||||
location_parent AS parent_id
|
||||
FROM
|
||||
location
|
||||
ORDER BY location_parent, location_sort, location_name";
|
||||
|
||||
$locations = $db->db_select($query);
|
||||
$sql = "SELECT location_id AS id, location_name AS value, location_parent AS parent_id
|
||||
FROM location
|
||||
ORDER BY location_parent, location_sort, location_name";
|
||||
$sth = $dbh->query($sql);
|
||||
$locations = $sth->fetchAll();
|
||||
|
||||
// function for recursion
|
||||
function build_tree($parent_id, $level) {
|
||||
|
||||
Reference in New Issue
Block a user