Is there an equivalent of PHP's mysql_real_escape_string() for Perl's DBI?
问题 Could some tell me if there is a function which works the same as PHP's mysql_real_escape_string() for Perl from the DBI module? 回答1: You should use placeholders and bind values. 回答2: Don't. Escape. SQL. Don't. Quote. SQL. Use SQL placeholders/parameters ( ? ). The structure of the SQL statement and the data values represented by the placeholders are sent to the database completely separately, so (barring a bug in the database engine or the DBD module) there is absolutely no way that the data