File: //var/www/html/pmw24/pmw_live_testing/OLD_Root_BAK/application/models/admin/Mdashboard.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Mdashboard extends CI_Model {
public function __construct() {
parent::__construct();
}
public function total_car()
{
$this->db->select('count(*) total_car');
$this->db->from('car');
$query=$this->db->get();
return $query->row_array();
}
public function total_mechanic()
{
$this->db->select('count(*) total_mechanic');
$this->db->from('admins');
$this->db->where('role_id', 14);
$query=$this->db->get();
return $query->row_array();
}
public function total_service()
{
$this->db->select('count(*) total_service');
$this->db->from('service');
$query=$this->db->get();
return $query->row_array();
}
}