where l.status = 1 and l.duration > 0 and l.user_id = $user_id $q_period group by l.project_id";
} elseif (CHART_TASKS == $ch_type) {
// Data for tasks.
$sql = "select t.name as name, sum(time_to_sec(l.duration)) as time from tt_log l
where l.status = 1 and l.duration > 0 and l.user_id = $user_id $q_period group by l.project_id";
} elseif (CHART_TASKS == $ch_type) {
// Data for tasks.
$sql = "select t.name as name, sum(time_to_sec(l.duration)) as time from tt_log l