in reply to Perl + DBI + mysql - Escaping Strings
Quoting is database driver specific. However, you probably can use the same algorithm for most of the commonly used databases. Have a look at the code for sub quote in the file DBI.pm. You'll see that there is some dependence on the database handle, but it is minimal.
Please tell us more about what your circumstances are. If you are given an SQL statement, it should already be well-formed and any embedded string literals already properly quoted.
|
|---|