For more information... RTFM!
NAVIGATION
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

sql

Change single-quote characters into doubled versions (' becomes '').

Also escapes blackslashes ("\" becomes "\\") unless you put the following somewhere on your page:


Also see the "dbi_quote" filter.

Note

Note

If you're using the [query] tag then you should use the [PREFIX-quote] sub-tag instead of this filter.

Example

[filter sql]Kevin's cat[/filter]

Results in:

Kevin''s cat

Source code

sub {
    my $val = shift;
    $val =~ s:':'':g;
    $val =~ s:\\:\\\\:g unless $::Pragma->{filter_sql_no_backslash};
    return $val;
}

Category:  Filters
Last modified by: Kevin Walsh
Modification date: Friday 23 February 2007 at 3:00 PM (EST)
Home  |  Legal nonsense  |  Privacy policy  |  Donations  |  Contact us