This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub escape4mysql { | |
# | |
# If you MUST construct sql, rather than use parameters via the | |
# api, you can use this function on STRINGS to avoid quote-hell sql | |
# injection attacks. | |
# | |
# One scenario is for constructing queries from spreadsheets, to be applied later in a batch. | |
# | |
# input: zero or more strings (undef is handled as null). |