Exemple #1
0
function GetAllTafsilis()
{
    $where = " t.IsActive='YES' AND t.TafsiliType=:g";
    $whereParam = array();
    $whereParam[":g"] = $_GET["TafsiliType"];
    $field = isset($_GET["fields"]) ? $_GET["fields"] : "concat(TafsiliID, TafsiliDesc)";
    if (isset($_GET["query"]) && $_GET["query"] != "") {
        $where .= " AND " . $field . " LIKE :qry ";
        $whereParam[":qry"] = "%" . $_GET["query"] . "%";
    }
    if (!empty($_REQUEST["Shareholder"])) {
        $where .= " AND p.IsShareholder='YES' ";
    }
    $temp = ACC_tafsilis::SelectAll($where . dataReader::makeOrder(), $whereParam);
    $no = $temp->rowCount();
    $temp = PdoDataAccess::fetchAll($temp, $_GET["start"], $_GET["limit"]);
    echo dataReader::getJsonData($temp, $no, $_GET["callback"]);
    die;
}