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 bc8ac46 commit 550a53e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions application/models/Itindata_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ public function get_clientsplain($where=null) {
public function get_clients($where = null) {

$q = "Select c.*, v.*, i.* from clients_tbl c
LEFT JOIN vehicles_tbl v ON c.id_client = v.client_vhcl
LEFT JOIN inspections_tbl i ON v.id_vhcl = i.vehicle_inspection";
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";

if (isset($where))
{
Expand Down Expand Up @@ -160,8 +160,8 @@ public function get_unisnpvehicles(){
public function get_vehiclesfull($where=null)
{
$q = "Select v.*, i.*, c.* from vehicles_tbl v
LEFT JOIN inspections_tbl i ON v.id_vhcl = i.vehicle_inspection
LEFT JOIN clients_tbl c ON v.client_vhcl = c.id_client"
LEFT JOIN inspections_tbl AS i ON v.id_vhcl = i.vehicle_inspection
LEFT JOIN clients_tbl AS c ON v.client_vhcl = c.id_client"
;

if (isset($where))
Expand Down Expand Up @@ -208,9 +208,9 @@ 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 v ON i.vehicle_inspection = v.id_vhcl
LEFT JOIN clients_tbl c ON i.client_inspection = c.id_client
LEFT JOIN users u ON i.inspector_inspection = u.id";
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";

if (isset($where))
{
Expand Down

0 comments on commit 550a53e

Please sign in to comment.