[welcome] SQL statements being totally wrong

pull/1660/head
Peter Goodhall 2022-10-11 17:10:44 +01:00
rodzic 75952cec2a
commit eecd2bf71d
6 zmienionych plików z 7 dodań i 8 usunięć

Wyświetl plik

@ -11,7 +11,6 @@ class Welcome extends CI_Controller {
public function index()
{
if($this->optionslib->get_option('version2_trigger') == "false") {
$data['page_title'] = "Welcome to Cloudlog Version 2.0";
@ -31,7 +30,7 @@ class Welcome extends CI_Controller {
$this->load->model('note');
$data['NumberOfNotes'] = $this->note->CountAllNotes();
if($data['CountAllStationLocations'] == 0 || $data['NumberOfStationLogbooks'] == 0 || $data['NumberOfAPIKeys'] > 0 || $data['NumberOfNotes'] > 0) {
if($data['CountAllStationLocations'] > 0 || $data['NumberOfStationLogbooks'] > 0 || $data['NumberOfAPIKeys'] > 0 || $data['NumberOfNotes'] > 0) {
// load views
$this->load->view('interface_assets/mini_header', $data);
$this->load->view('welcome/index');

Wyświetl plik

@ -15,7 +15,7 @@ class API_Model extends CI_Model {
}
function CountKeysWithNoUserID() {
$this->db->where('user_id !=', NULL);
$this->db->where('user_id =', NULL);
$query = $this->db->get('api');
return $query->num_rows();
}

Wyświetl plik

@ -9,7 +9,7 @@ class Logbooks_model extends CI_Model {
function CountAllStationLogbooks() {
// count all logbooks
$this->db->where('user_id !=', NULL);
$this->db->where('user_id =', NULL);
$query = $this->db->get('station_logbooks');
return $query->num_rows();
}

Wyświetl plik

@ -57,7 +57,7 @@ class Note extends CI_Model {
function CountAllNotes() {
// count all notes
$this->db->where('user_id', NULL);
$this->db->where('user_id =', NULL);
$query = $this->db->get('notes');
return $query->num_rows();
}

Wyświetl plik

@ -157,7 +157,7 @@ class Stations extends CI_Model {
}
function CountAllStationLocations() {
$this->db->where('user_id !=', NULL);
$this->db->where('user_id =', NULL);
$query = $this->db->get('station_profile');
return $query->num_rows();
}

Wyświetl plik

@ -92,7 +92,7 @@
<br>
<?php if(!$CountAllStationLocations) { ?>
<?php if($CountAllStationLocations > 0) { ?>
<div class="card">
<div class="card-header">Assign ALL Station Locations to this username</div>
<div class="card-body">
@ -104,7 +104,7 @@
<br>
<?php } ?>
<?php if(!$NumberOfStationLogbooks) { ?>
<?php if($NumberOfStationLogbooks > 0) { ?>
<div class="card">
<div class="card-header">Create Station Logbooks</div>
<div class="card-body">