Error 500 MySQL when INSERT .. SELECT FROM

Dear Taifun,

I apologize for having to contact you, but I have the issue that when using your MySQL PHP interface, I get Error 500 when firing an encapsulated SQL, like INSERT into SELECT..

You mentioned this problem in your FAQ at
https://puravidaapps.com/mysql.php :
Q5 : How can I use INSERT ... FROM SELECT ... statements?
A : See Alex_Mei's solution here. Thank you Alex_Mei.

Unfortunately, the link is not working anymore and I absolutely can't find another web page with the solution.

Please advise, thank you so much for your time!

BR Constantin Hagen

unfortunately the answer links to a Thunkable thread, and it looks like that thread has been removed...
this is unfortunate... currently I do not have an answer...
probably someone else does have an idea?

Taifun


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

Do you mean this:

https://www.w3schools.com/sql/sql_insert_into_select.asp

yes, but it looks like more complex queries result in an error 500, it might be, that the php script can't handle it...
the question is, are there any workarounds for INSERT... SELECT FROM or what could be modified in the php script to do it...

Taifun

That SQL statement is equivalent to selecting from the first table, then transforming the output into a sequence of INSERT statements into the second table.

You should be able to work around that.

Worth trying one of these ?
https://www.w3schools.com/php/php_mysql_insert.asp