Skip to content

Commit

Permalink
Merge pull request #1104 from alexandro82/develop
Browse files Browse the repository at this point in the history
Update application/controllers/reports.php
  • Loading branch information
rjmackay committed May 3, 2013
2 parents 502566f + a17b7b8 commit 6e49ba0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/controllers/reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -915,11 +915,11 @@ private function _get_rating($id = FALSE, $type = NULL)

if ($type == 'original')
{
$result = $this->db->query('SELECT SUM(rating) as total_rating FROM rating WHERE incident_id = ?', $id);
$result = $this->db->query('SELECT SUM(rating) as total_rating FROM '.$this->table_prefix.'rating WHERE incident_id = ?', $id);
}
elseif ($type == 'comment')
{
$result = $this->db->query('SELECT SUM(rating) as total_rating FROM rating WHERE comment_id = ?', $id);
$result = $this->db->query('SELECT SUM(rating) as total_rating FROM '.$this->table_prefix.'rating WHERE comment_id = ?', $id);
}

if ($result->count() == 0 OR $result->current()->total_rating == NULL) return 0;
Expand Down

0 comments on commit 6e49ba0

Please sign in to comment.