Rank is a reserved keyword in MySQL 8. Before upgrading, make sure it's not a table name, column, or alias used in a query.
Showing posts with label MySQL. Show all posts
Showing posts with label MySQL. Show all posts
Friday, January 29, 2021
Thursday, December 27, 2018
ColdFusion - using a colon in sql with queryexecute
queryexecute doesn't seem to allow escaping colons in sql.
Using MySQL regexp character classes will throw an error if entered in the sql directly.
A workaround is to add the regex expression as a queryparam.
The following will throw an error:
queryexecute("SELECT [column] REGEXP '[[:character-class:]]'...");
Here's the workaround:
queryexecute("SELECT [column] REGEXP :regex...",{regex:{value:"'[[:character-class:]]'"}});
Using MySQL regexp character classes will throw an error if entered in the sql directly.
A workaround is to add the regex expression as a queryparam.
The following will throw an error:
queryexecute("SELECT [column] REGEXP '[[:character-class:]]'...");
Here's the workaround:
queryexecute("SELECT [column] REGEXP :regex...",{regex:{value:"'[[:character-class:]]'"}});
Subscribe to:
Posts (Atom)