Fixing my rubbish code

This commit is contained in:
Peter Goodhall
2022-10-11 14:54:34 +01:00
parent 930d80c1fb
commit 8bbc0ba9bc
3 changed files with 8 additions and 8 deletions

View File

@@ -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();
}
}