Skip to content

Commit

Permalink
Update Itindata_model.php
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlosb committed Feb 20, 2024
1 parent fab11b7 commit aacccb0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions application/models/Itindata_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ public function get_clientsplain($where=null) {

public function get_clients($where = null) {

$q = "Select c.*, v.*, i.* from clients_tbl c
$q = "Select c.*, v.*, k.* from clients_tbl c
LEFT JOIN vehicles_tbl AS v ON c.id_client = v.client_vhcl
LEFT JOIN inspections_tbl AS i ON v.id_vhcl = i.vehicle_inspection";
LEFT JOIN inspections_tbl AS k ON v.id_vhcl = k.vehicle_inspection";

if (isset($where))
{
Expand Down Expand Up @@ -159,8 +159,8 @@ public function get_unisnpvehicles(){

public function get_vehiclesfull($where=null)
{
$q = "Select v.*, i.*, c.* from vehicles_tbl v
LEFT JOIN inspections_tbl AS i ON v.id_vhcl = i.vehicle_inspection
$q = "Select v.*, k.*, c.* from vehicles_tbl v
LEFT JOIN inspections_tbl AS k ON v.id_vhcl = k.vehicle_inspection
LEFT JOIN clients_tbl AS c ON v.client_vhcl = c.id_client"
;

Expand Down Expand Up @@ -207,10 +207,10 @@ public function set_inspection($data) {

public function get_inspectionsfull($where=null)
{
$q = "Select i.*, v.*, c.*, u.first_name, u.last_name from inspections_tbl I
LEFT JOIN vehicles_tbl AS v ON i.vehicle_inspection = v.id_vhcl
LEFT JOIN clients_tbl AS c ON i.client_inspection = c.id_client
LEFT JOIN users AS u ON i.inspector_inspection = u.id";
$q = "Select k.*, v.*, c.*, u.first_name, u.last_name from inspections_tbl as k
LEFT JOIN vehicles_tbl AS v ON k.vehicle_inspection = v.id_vhcl
LEFT JOIN clients_tbl AS c ON k.client_inspection = c.id_client
LEFT JOIN users AS u ON k.inspector_inspection = u.id";

if (isset($where))
{
Expand Down

0 comments on commit aacccb0

Please sign in to comment.