summaryrefslogtreecommitdiffstats
path: root/libmariadb/man/mysql_real_escape_string.3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
commit06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /libmariadb/man/mysql_real_escape_string.3
parentInitial commit. (diff)
downloadmariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz
mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libmariadb/man/mysql_real_escape_string.3')
-rw-r--r--libmariadb/man/mysql_real_escape_string.349
1 files changed, 49 insertions, 0 deletions
diff --git a/libmariadb/man/mysql_real_escape_string.3 b/libmariadb/man/mysql_real_escape_string.3
new file mode 100644
index 00000000..0a0f51f4
--- /dev/null
+++ b/libmariadb/man/mysql_real_escape_string.3
@@ -0,0 +1,49 @@
+.\" Automatically generated by Pandoc 2.5
+.\"
+.TH "mysql_real_escape_string" "3" "" "Version 3.3.1" "MariaDB Connector/C"
+.hy
+.SS Name
+.PP
+mysql_real_escape_string \- escape string by taking into account
+character set of connection
+.SS Synopsis
+.IP
+.nf
+\f[C]
+#include <mysql.h>
+
+unsigned long mysql_real_escape_string(MYSQL * mysql,
+ char * to,
+ const char * from,
+ unsigned long);
+\f[R]
+.fi
+.SS Description
+.PP
+This function is used to create a legal SQL string that you can use in
+an SQL statement.
+The given string is encoded to an escaped SQL string, taking into
+account the current character set of the connection.
+.SS Parameter
+.IP \[bu] 2
+\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
+\f[B]mysql_init(3)\f[R] and connected by
+\f[B]mysql_real_connect(3)\f[R].
+.IP \[bu] 2
+\f[C]to\f[R] \- buffer for the encoded string.
+The size of this buffer must be length * 2 + 1 bytes: in worst case
+every character of the from string needs to be escaped.
+Additionally a trailing 0 character will be appended.
+.IP \[bu] 2
+\f[C]from\f[R] \- a string which will be encoded by
+mysql_real_escape_string().
+.IP \[bu] 2
+\f[C]long\f[R] \- the length of the \f[C]from\f[R] string.
+.SS Return value
+.PP
+Returns the length of the encoded (to) string.
+.SS See also
+.IP \[bu] 2
+\f[B]mysql_escape_string(3)\f[R]
+.IP \[bu] 2
+\f[B]mysql_hex_string(3)\f[R]