if ($onlyBasic == true) { $appQuery = $this->db->query("SELECT * FROM applications WHERE user_id='0'"); }else{ $appQuery = $this->db->query("SELECT * FROM applications"); } if ($appQuery-> num_rows() > 0) {