Kimai_Database_Mysql::project_get_activities PHP Method

project_get_activities() public method

returns all the activities which were assigned to a project
Author: sl
public project_get_activities ( integer $projectID ) : array
$projectID integer ID of the project
return array contains the activityIDs of the activities or false on error
    public function project_get_activities($projectID)
    {
        $projectId = MySQL::SQLValue($projectID, MySQL::SQLVALUE_NUMBER);
        $p = $this->kga['server_prefix'];
        $query = "SELECT activity.*, activityID, budget, effort, approved\n                FROM {$p}projects_activities AS p_a\n                JOIN {$p}activities AS activity USING(activityID)\n                WHERE projectID = {$projectId} AND activity.trash=0;";
        $result = $this->conn->Query($query);
        if ($result == false) {
            $this->logLastError('project_get_activities');
            return false;
        }
        $rows = $this->conn->RecordsArray(MYSQLI_ASSOC);
        return $rows;
    }
Kimai_Database_Mysql