Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creator fails on INSERT with SET and ON DUPLICATE KEY #310

Open
andrews05 opened this issue Aug 6, 2019 · 1 comment
Open

Creator fails on INSERT with SET and ON DUPLICATE KEY #310

andrews05 opened this issue Aug 6, 2019 · 1 comment

Comments

@andrews05
Copy link
Contributor

andrews05 commented Aug 6, 2019

This statement fails with PHPSQLParser\exceptions\UnableToCreateSQLException: unknown [expr_type] = reserved in "SET" [1]

INSERT INTO `wp_options` SET `option_name` = 'some_key', `option_value` = 'some_value', `autoload` = 'yes' ON DUPLICATE KEY UPDATE `option_value` = 'some_value'
@BrockleyJohn
Copy link

Probably related: when parsed and reassembled, this one fails with
unknown [expr_type] = reserved in "record" [2]
INSERT INTO mytable (column1, column2, column3) SELECT myalias.column1, myalias.column2, 'mynewid' FROM mytable myalias WHERE myalias.column3 = 'myoldid' ON DUPLICATE KEY UPDATE column1 = VALUES(column1), column2 = VALUES(column2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants