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); } }
function runreg() { $conn = new mysqli("p:localhost", "trend", "only!trend!", "trend"); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } // select a collection (analogous to a relational database's table) $colnames = ['housesale', 'aptsale', 'flatsale', 'houserent', 'aptrent', 'flatrent']; foreach ($colnames as $colname) { $tname = $colname . "_reg"; // Let's remove all first //$col2->drop([]); // add agg information mkregall($conn, $colname, $tname); } }