1mysql_hex_string(3) MariaDB Connector/C mysql_hex_string(3)
2
3
4
5 Name
6 mysql_hex_string - create a hexadecimal string
7
8 Synopsis
9 #include <mysql.h>
10 unsigned long mysql_hex_string(char * to,
11 const char * from,
12 unsigned long len);
13
14 Description
15 This function is used to create a hexadecimal string which can be used
16 in SQL statements. e.g. INSERT INTO my_blob VALUES(X'A0E1CD').
17
18 Parameter
19 • to - result buffer
20
21 • from - the string which will be encoded
22
23 • len - length of the string (from)
24
25 Notes
26 • The size of the buffer for the encoded string must be 2 * length + 1.
27
28 • The encoded string does not contain a leading X’.
29
30 Return value
31 Returns the length of the encoded string without the trailing null
32 character.
33
34 See also
35 • mysql_real_escape_string(3)
36
37
38
39Version 3.2.2 mysql_hex_string(3)