https://bugs.koozali.org/show_bug.cgi?id=13233

--- Comment #12 from Brian Read <[email protected]> ---
Maybe this

# Simple SQL string/identifier quoting for MariaDB/MySQL
sub sqlq { my $s = shift; return 'NULL' unless defined $s; $s =~
s/([\\'])/\\$1/g; return "'$s'"; }
sub idq  { my $s = shift; $s =~ s/`/``/g; return "`$s`"; }

my $db_i   = idq($db);     # identifier-quoted db
my $db_s   = sqlq($db);    # string-quoted db (for SELECT/WHERE)
my $user_s = sqlq($user);
my $host_s = sqlq($host);
my $pass_s = sqlq($pass);

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
_______________________________________________
Mail for each SME Contribs bug report
To unsubscribe, e-mail [email protected]
Searchable archive at https://lists.contribs.org/mailman/public/contribteam/

Reply via email to