コード例 #1
0
ファイル: mkreg.php プロジェクト: hunkim/kproperty
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);
    }
}
コード例 #2
0
ファイル: top10.php プロジェクト: hunkim/kproperty
<?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') {