Removed obsolete get_years method.

This commit is contained in:
Alexis Lahouze 2013-01-09 11:56:02 +01:00
parent 9b1c906032
commit 264ce12658

View File

@ -105,29 +105,6 @@ class EntryAPI extends RestAPI {
}
}
protected function get_years() {
$account=$this->_request['account'];
$connection=$this->get_db_connection();
$statement=$connection->prepare("select distinct extract(year from value_date) as year from entry where account_id = :account order by year desc");
$statement->bindParam("account", $account);
$return=$statement->execute();
if($return) {
$result=[];
foreach($statement->fetchAll(PDO::FETCH_NUM) as $value) {
array_push($result, $value[0]);
}
$this->response($result);
} else {
$this->response($statement->errorInfo()[2], 500);
}
}
protected function get_months() {
$account=$this->_request['account'];