Page 1 of 1

How to change AUTO-QUERY!?

Posted: 24.03.2018, 17:53
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...

Re: How to change AUTO-QUERY!?

Posted: 25.03.2018, 09:39
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