in reply to Re: Mysql queries with ' and "
in thread Mysql queries with ' and "

$insert_query =~ s/'/\\'/g;
No, the right way would be to use the $dbh->quote() method, or even better, to use placeholders as suggested below.

Replies are listed 'Best First'.
Re^3: Mysql queries with ' and "
by fattahsafa (Sexton) on Mar 12, 2014 at 20:36 UTC
    Thank you ! Placeholder works well