Skip to content

Commit

Permalink
Merge pull request kohana#83 from neo22s/patch-2
Browse files Browse the repository at this point in the history
Update ORM.php
refs #4652
  • Loading branch information
zeelot committed May 31, 2013
2 parents 9273028 + f53ee39 commit e7de33d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/Kohana/ORM.php
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,7 @@ public function count_all()
$this->_build(Database::SELECT);

$records = $this->_db_builder->from(array($this->_table_name, $this->_object_name))
->select(array(DB::expr('COUNT(*)'), 'records_found'))
->select(array(DB::expr('COUNT('.$this->_db->quote_column($this->_primary_key).')'), 'records_found'))
->execute($this->_db)
->get('records_found');

Expand Down

0 comments on commit e7de33d

Please sign in to comment.