I'm trying to merge old Delphi app from BDE+MySQLODBC to Zeos.
I have a complicated query which joins few tables:
Code: Select all
SELECT *, bodyType(cars.id) as `class` from cars
LEFT JOIN clients ON cars.client_id = clients.id
LEFT JOIN models ON cars.model_id=models.id
LEFT JOIN engine_types ON cars.engine_type_id=engine_types.id
LEFT JOIN transmissions ON cars.transmission_id=transmissions.id
ORDER BY cars.body ASC, cars.vin ASC
For example:
Code: Select all
ZQuery1.Filter := 'body LIKE '''+Edit1.Text+'%'' AND VIN LIKE '''+Edit1.Text+'%''';
Thank you in advance! And sorry for my english