Forum

mySQL Delete - wrong syntax

Hi,

the Delete(mySQL Network) seems to produce the wrong query. (Is not doing anything).
I’m connected to a database and all ohter nodes (Insert, Select, Update) work fine.

I want to delete a row from a table called “sound” where “length = 10s”.
The node produces the statement:

DELETE sound WHERE length = ‘10s’

Shouldn’t this be:

DELETE FROM sound WHERE length = ‘10s’

The status says:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE length = ‘10s’’ at line 1

When looking at the helppatches of all other Delete nodes but the one for MySQL you see that vux added the “FROM” string to the Table. So i guess as a workaround that should work for you.

But also it would be interesting to hear from @vux if there was a specific reason for doing it like that or we could risk a fix there (which would be a breaking change)?!

Adding the FROM to the Table pin worked fine as a fix.
Cheers!

merke: never hesitate to fix a mess