diff --git a/lib/WebGUI/SQL.pm b/lib/WebGUI/SQL.pm index 37720f702..0b9e483d0 100644 --- a/lib/WebGUI/SQL.pm +++ b/lib/WebGUI/SQL.pm @@ -861,6 +861,24 @@ sub quoteAndJoin { } +#------------------------------------------------------------------- + +=head2 quoteIdentifier ( string ) + +Returns a string quoted as an identifier to be used as a table name, column name, etc. + +=head3 string + +Any scalar variable that needs to be escaped to be inserted into the database. + +=cut + +sub quoteIdentifier { + my $self = shift; + my $value = shift; + return $self->dbh->quote_identifier($value); +} + #------------------------------------------------------------------- =head2 read ( sql [ , placeholders ] )