Advertisement
Guest User

Untitled

a guest
May 4th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. SELECT DISTINCT `location_district`.`id`,
  2. `location_district`.`name`,
  3. `location_district`.`name_ru`,
  4. `location_district`.`name_en`,
  5. `location_district`.`nameslug`,
  6. `location_district`.`lat`,
  7. `location_district`.`lon`,
  8. `location_district`.`zoom`,
  9. `location_district`.`country_id`,
  10. `location_district`.`region_id`,
  11. `location_district`.`city_id`
  12. FROM `location_district`
  13. WHERE `location_district`.`id` IN
  14. (SELECT U3.`district_id`
  15. FROM `transport_vehicle` U0
  16. INNER JOIN `transport_vehiclepark` U1 ON (U0.`park_id` = U1.`id`)
  17. LEFT OUTER JOIN `gpsreceiver_vehiclegpsreceiver` U2 ON (U0.`gps_supplier_id` = U2.`id`)
  18. INNER JOIN `transport_vehicleenterprise` U3 ON (U1.`enterprise_id` = U3.`id`)
  19. WHERE (U0.`id` LIKE '%29555%'
  20. OR U0.`registration_code` LIKE '%29555%'
  21. OR U1.`name` LIKE '%29555%'
  22. OR U0.`park_code` LIKE '%29555%'
  23. OR U2.`name` LIKE '%29555%'
  24. OR U2.`code` LIKE '%29555%'
  25. OR U0.`gps_device_code` LIKE '%29555%'))
  26. ORDER BY `location_district`.`name` ASC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement