How to change AUTO-QUERY!?

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
fefted
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 24.03.2018, 17:31

How to change AUTO-QUERY!?

Post by fefted »

MYSQL. When I save my changes(ZQuery1.Post) zquery sends automatic query. For Example: I Delete one record and ZQuery creates this query automatically (" DELETE FROM `tablename` WHERE `1`=1 AND `2`='2' ") and sends this to the server.
I want to take an AUTO-QUERY and change it. For Example: add LIMIT 1 on the end (" DELETE FROM `tablename` WHERE `1`=1 AND `2`='2' LIMIT 1 ").
PLEASE!!! HELP ME!!! Every day I try to find it...
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: How to change AUTO-QUERY!?

Post by marsupilami »

Hello fefted,

It seems like your table lacks a primary key. With Zeos you have two options at this time:
  • Add a primary key to your table. Zeos will use it automatically.
  • Use a TZUpdateSQL object. There you can specify your own SQL for updates, deletes and what not. There is a chapter about this in the Zeos Documentation collection
Best regards,

Jan
Post Reply