Use SQL from on module to update entities in another

Use SQL from on module to update entities in another

  

Good day

So what i need to do is the following.

In my AMS module I have an entity that has a field SQL. This field stores SQL statements from a requester(Someone that asks admin to check and run the SQL).

I then display this SQL from the requester in an input box. The admin then checks if the SQL looks correct, if he/she is satisfied they would then click a submit button.

What i then want to know is how do I make this SQL query whether its Update, Delete, or what ever needs to do run and change the entity from another module.


So if i can summarize. I want the SQL from one module to run and perform some action that then changes the  data of an entity in another module.

Hi,


My first question would be.... Why?

This is very error-prone i would not advise this.

What is wrong with normal aggregates and proper pages?



J. wrote:

Hi,


My first question would be.... Why?

This is very error-prone i would not advise this.

What is wrong with normal aggregates and proper pages?



So the reason behind this is, there are currently people making changes to the entities in some of the modules, but there doing it wrong. Now in these entities there are errors. So the whole idea behind this is to prevent people from making changes to the entities that do not have the required knowledge almost like a fail safe of sorts.