function runreg() { $conn = DBconn(); // select a collection (analogous to a relational database's table) $colnames = ['housesale', 'aptsale', 'flatsale', 'houserent', 'aptrent', 'flatrent', 'officetelrent', 'officetelsale', 'aptlots', 'landsale']; foreach ($colnames as $colname) { $tname = $colname . "_reg"; // Let's remove all first //$col2->drop([]); // add agg information mkregall($conn, $colname, $tname); } }
<?php include_once 'dbconn.php'; header("Access-Control-Allow-Origin: *"); header("Content-Type: application/json; charset=UTF-8"); $tname = substr($_SERVER['PATH_INFO'], 1); $conn = DBconn(false); $debug = false; $delta = false; $monthly = false; $preYear = 2014; $year = 2015; //state='?' and city='?' and county='?' $q = ""; foreach ($_GET as $key => $val) { if ($key == 'debug') { $debug = true; continue; } if ($key == 'monthly') { $monthly = true; continue; } if ($key == 'delta') { $delta = true; continue; } if ($key == 'query') { continue; } if ($key == 'year') {