.\" This man page is automatically generated using .\" kayadoc2man from the Kaya development tools and the -xmldocs compile .\" option. Editing it directly is not encouraged. .\" It is under the same license as the source .k file that it was .\" generated from. .TH "DB.prepare" "3kaya" "August 2014" "Kaya" "Kaya module reference" .SH "NAME" DB::prepare \- Prepare a database query .SH "SYNOPSIS" .B DBStatement prepare( \fIDBHandle con, String query\fP .B ")" .SH "ARGUMENTS" .PP .B "con" The database connection .PP .B "query" The query template. This may contain replacement characters at some places (consult the manual for the specific database to find out what replacement syntax should be used) which will be replaced with variables in the .B "DB.execPrepared"(3kaya) function. .SH "DESCRIPTION" .PP Prepare a database query. Prepared queries can then be executed later, using a parameter-replacement method that generally avoids SQL injection attacks. .IP "" -4 st = prepare(con,"SELECT * FROM Users WHERE username = $1"); .SH "AUTHORS" Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/ .SH LICENSE The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation. .SH "RELATED" .PD 0 .PP .B "DB.DBStatement"(3kaya) .PP .B "DB.execPrepared"(3kaya) .PD 0.4v