Skip to content

Instantly share code, notes, and snippets.

@Epigene
Created September 12, 2018 13:22
Show Gist options
  • Save Epigene/e459b4642552f3bb85b58f6bce775369 to your computer and use it in GitHub Desktop.
Save Epigene/e459b4642552f3bb85b58f6bce775369 to your computer and use it in GitHub Desktop.
SELECT `applications`.* FROM `applications` LEFT OUTER JOIN `agreements` `agreements_f0` ON `applications`.`id` = `agreements_f0`.`application_id` WHERE ((`applications`.`hidden` = ? OR `applications`.`hidden` IS ?)) AND ((LOWER(`applications`.`client_name`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_email`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_identification_no`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_phone`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_phone2`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_phone3`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_phone4`) LIKE LOWER(?)) OR (LOWER(`applications`.`vehicle_no`) LIKE LOWER(?)) OR (LOWER(`applications`.`vehicle_vin`) LIKE LOWER(?)) OR (LOWER(`applications`.`vehicle_no2`) LIKE LOWER(?)) OR (LOWER(`applications`.`vehicle_technical_certificate_no`) LIKE LOWER(?)) OR (LOWER(`applications`.`vehicle_technical_certificate_no2`) LIKE LOWER(?)) OR (LOWER(`applications`.`number`) LIKE LOWER(?)) OR (LOWER(`applications`.`request_number`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_consent_id`) LIKE LOWER(?)) OR (LOWER(`applications`.`id`) LIKE LOWER(?)) OR (LOWER(`applications`.`client_ip`) LIKE LOWER(?)) OR (LOWER(`agreements_f0`.`hansaworld_id`) LIKE LOWER(?))) ORDER BY `applications`.`created_at` DESC LIMIT ? OFFSET ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment