Using multiquery with the puravida mysql solution

Hi everyone!

I'm using an app to read and write data to a sql datasource using the puravida mysql solution.
Everything works fine but I have a small issue regarding a multiquery.

At a point I want to update a single record where the identifier matches a value stored in TinyDB.
This works fine but before I'm sending the query I check if there's an internet connection. If so the query can be executed. If there's no connection then I store the query to the TInyDB and I retry it at a later moment. So when there no connection fot a while the TinyDB query value contains multiple UPDATE statements devided with a ';'. On my sql server I can execute this in one sql command.
With the Puravida solution this does not work. Is there a way to enable multiquery in this php script?

Regards,
Dennis

you can also use DEEP_HOST MYSQL database extension and you can download it from his app.
search DEEP_HOST app in play store and doenload it.

if you not found then tell me i will send you.

thank you

@Nick, an extension is not always the answer to everything, especially a DeepHost one.....

the php script executes only single sql statements... this also to prevent sql injections...

as solution you might want to send the update statements one by one to the server...
see also how this could work here (which is a different example, but same concept)...

deep host used my php script (btw. without giving attribution, i.e without respecting my license) and created an extension, which added only some overhead from my point of view... no extension needed... just use the web component as shown here App Inventor Tutorials and Examples: MySQL | Pura Vida Apps

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Thanks Taifun for your reply. I've found a working solution. My app now sends the update commands one by one like you mentioned.

the suggestion was to send the queries asynchronously, i.e. after the first query was executed successfully, then send the second, and after the second was executed successfully, then send the third, etc.

your solution works synchronously... you are not checking, if a query has been executed successfully... and in case there are a lot of queries to send, your solution might not work anymore without issues... this is something to test...

Taifun