src/AsyncWeb/Api/REST/DB.php
public function get($table, $where = array(), $offset = null, $count = null, $time = null, $order = array(), $od = "ValidFrom", $do = "ValidUntil", $id2 = "ID", $cols = array(), $groupby = array(), $having = array(), $distinct = false, $fast = false) {
        $data = array("QueryBuilder" => array("Where" => $where, "Offset" => $offset, "Limit" => $count, "Time" => $time, "Sort" => $order, "Cols" => $cols, "GroupBy" => $groupby, "Having" => $having, "Distinct" => $distinct));
        $data["ApiKeySession"] = $this->Session;
        $data["CRC"] = Client::MakeCRC($data, $this->ApiPass);
        try {
            $results = Client::Call($this->Server . "/" . $table . "/Request", $data);
            return new APIResult($results);
        }
        catch(\Exception $exc) {
            $this->lastError = $exc->getMessage();
            if (self::$DEBUG_CRC) {
                if (strpos($this->lastError, "CRC does not match")) {
                    $add = "Request failed! Client data: ";
                    $add.= \AsyncWeb\Api\REST\Client::MakeHashString($data);
                    $add.= " CRC: " . Client::MakeCRC($data, $this->ApiPass);
                    $this->lastError.= "<br>\n" . $add;
                }
            }
            return false;
        }
    }
public function get($table, $where = array(), $offset = null, $count = null, $time = null, $order = array(), $od = "ValidFrom", $do = "ValidUntil", $id2 = "ID", $cols = array(), $groupby = array(), $having = array(), $distinct = false, $fast = false) {
        $data = array("QueryBuilder" => array("Where" => $where, "Offset" => $offset, "Limit" => $count, "Time" => $time, "Sort" => $order, "Cols" => $cols, "GroupBy" => $groupby, "Having" => $having, "Distinct" => $distinct));
        $data["ApiKeySession"] = $this->Session;
        $data["CRC"] = Client::MakeCRC($data, $this->ApiPass);
        try {
            $results = Client::Call($this->Server . "/" . $table . "/Request", $data);
            return new APIResult($results);
        }
        catch(\Exception $exc) {
            $this->lastError = $exc->getMessage();
            if (self::$DEBUG_CRC) {
                if (strpos($this->lastError, "CRC does not match")) {
                    $add = "Request failed! Client data: ";
                    $add.= \AsyncWeb\Api\REST\Client::MakeHashString($data);
                    $add.= " CRC: " . Client::MakeCRC($data, $this->ApiPass);
                    $this->lastError.= "<br>\n" . $add;
                }
            }
            return false;
        }
    }
public function get ( $ table , $ where = array ( ) , $ offset = null , $ count = null , $ time = null , $ order = array ( ) , $ od = "ValidFrom" , $ do = "ValidUntil" , $ id2 = "ID" , $ cols = array ( ) , $ groupby = array ( ) , $ having = array ( ) , $ distinct = false , $ fast = false ) { $ data = array ( "QueryBuilder" => array ( "Where" => $ where , "Offset" => $ offset , "Limit" => $ count , "Time" => $ time , "Sort" => $ order , "Cols" => $ cols , "GroupBy" => $ groupby , "Having" => $ having , "Distinct" => $ distinct ) ) ; $ data [ "ApiKeySession" ] = $ this -> Session ; $ data [ "CRC" ] = Client :: MakeCRC ( $ data , $ this -> ApiPass ) ; try { $ results = Client :: Call ( $ this -> Server . "/" . $ table . "/Request" , $ data ) ; return new APIResult ( $ results ) ; } catch ( \ Exception $ exc ) { $ this -> lastError = $ exc -> getMessage ( ) ; if ( self :: $ DEBUG_CRC ) { if ( strpos ( $ this -> lastError , "CRC does not match" ) ) { $ add = "Request failed! Client data: " ; $ add .= \ AsyncWeb \ Api \ REST \ Client :: MakeHashString ( $ data ) ; $ add .= " CRC: " . Client :: MakeCRC ( $ data , $ this -> ApiPass ) ; $ this -> lastError .= "<br>\n" . $ add ; } } return false ; } }
Returns the resource object for the result. Please use fetch method to get the result for each row.
@return APIResult Result of the query
Returns the resource object for the result . Please use fetch method to get the result for each row .