diff --git a/api_db.php b/api_db.php index daa04813..5ddde06e 100644 --- a/api_db.php +++ b/api_db.php @@ -94,6 +94,19 @@ if(!$db) die("Error connecting to database"); } +if(isset($_GET["network"]) && $auth) +{ + $network = array(); + $results = $db->query('SELECT * FROM network'); + + if(!is_bool($results)) + $result = $results; + while($res = $results->fetchArray(SQLITE3_ASSOC)) + array_push($network, $res); + + $data = array_merge($data, array('network' => $network)); +} + if (isset($_GET['getAllQueries']) && $auth) { $allQueries = array();