mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-25 19:42:30 +00:00
Fixing my rubbish code
This commit is contained in:
@@ -57,9 +57,9 @@ class Note extends CI_Model {
|
||||
|
||||
function CountAllNotes() {
|
||||
// count all notes
|
||||
// where user_id is not NULL
|
||||
$this->db->where('user_id !=', NULL);
|
||||
return $this->db->count_all('notes');
|
||||
$this->db->where('user_id', NULL);
|
||||
$query = $this->db->get('notes');
|
||||
return $query->num_rows();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user