Quoter handles value quoting, unquoting, escaping, etc.
Quoter | Quoter handles value quoting, unquoting, escaping, etc. |
Functions | |
new | |
quote | Quote values in backticks. |
quote_val | Quote a value for use in a SQL statement. |
split_unquote | Split and unquote a table name. |
literal_like | Escape LIKE wildcard % and _. |
join_quote | Join and backtick-quote a database name with a table name. |
sub split_unquote
Split and unquote a table name. The table name can be database-qualified or not, like `db`.`table`. The table name can be backtick-quoted or not.
$db_tbl | Table name |
$default_db | Default database name to return if $db_tbl is not database-qualified |
Array: unquoted database (possibly undef), unquoted table
sub join_quote
Join and backtick-quote a database name with a table name. This sub does the opposite of split_unquote.
$default_db | Default database name to use if $db_tbl is not database-qualified |
$db_tbl | Table name, optionally database-qualified, optionally quoted |
Backtick-quoted, database-qualified table like `database`.`table`
sub new
Quote values in backticks.
sub quote
Quote a value for use in a SQL statement.
sub quote_val
Split and unquote a table name.
sub split_unquote
Escape LIKE wildcard % and _.
sub literal_like
Join and backtick-quote a database name with a table name.
sub join_quote