1DB.escape(3kaya) Kaya module reference DB.escape(3kaya)
2
3
4
6 DB::escape - Escape a string to be used as part of a query
7
9 String escape( String val )
10
12 val The String to escape
13
15 Escapes backslashes, apostrophes and quotes in a string to protect
16 against SQL injection attacks. This function should be used only as a
17 last resort - prepared statements using DB.prepare (3kaya) and
18 DB.execPrepared (3kaya) are supported by all database libraries, and
19 are far less prone to human error.
20
21 This function will escape Tainted strings, returning an untainted
22 string.
23
25 Kaya standard library by Edwin Brady, Chris Morris and others
26 (kaya@kayalang.org). For further information see http://kayalang.org/
27
29 The Kaya standard library is free software; you can redistribute it
30 and/or modify it under the terms of the GNU Lesser General Public
31 License (version 2.1 or any later version) as published by the Free
32 Software Foundation.
33
35 Builtins.Tainted (3kaya)
36
37
38
39Kaya December 2010 DB.escape(3kaya)