sub quote($) {
                my ($val) = @_;
                $val = join ",",@{$val} if ref($val) eq "ARRAY";
                return qq{'$val'} unless $val =~ /'/;
                return qq{"$val"} unless $val =~ /"/;
                $val = s/'/\\'/g;
                return qq{'$val'};
        }
is a good routine that works for mysql... but the correct way to do
the do is to use $DBI->quote("O'brian")

Don't use HTML::Entities unless you want " in your database!


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to