Account::getDataSetHistory PHP Method

getDataSetHistory() public method

public getDataSetHistory ( $configurationID )
    public function getDataSetHistory($configurationID)
    {
        $accountID = $this->accountID;
        $prefix = Core::getDbTablePrefix();
        $response = Core::$db->query("\n            SELECT  ch.*, unix_timestamp(ch.last_updated) as last_updated_unix\n            FROM    {$prefix}configuration_history ch, {$prefix}configurations c\n            WHERE c.account_id = {$accountID} AND\n                  c.configuration_id = {$configurationID} AND\n                  c.configuration_id = ch.configuration_id\n            ORDER BY ch.last_updated DESC\n        ");
        if ($response["success"]) {
            $data = array("maxResults" => Core::getMaxDataSetHistorySize(), "results" => array());
            while ($row = mysqli_fetch_assoc($response["results"])) {
                $data["results"][] = $row;
            }
            return array("success" => true, "message" => $data);
        } else {
            return array("success" => false, "message" => $response["errorMessage"]);
        }
    }