FreeBSD manual

download PDF document: mysql_hex_string.3.pdf

mysql_hex_string(3) MariaDB Connector/C mysql_hex_string(3)
Name mysql_hex_string - create a hexadecimal string
Synopsis
#include <mysql.h> unsigned long mysql_hex_string(char * to, const char * from, unsigned long len);

Description This function is used to create a hexadecimal string which can be used in SQL statements. e.g. INSERT INTO my_blob VALUES(X'A0E1CD').
Parameter o to - result buffer
o from - the string which will be encoded
o len - length of the string (from)
Notes o The size of the buffer for the encoded string must be 2 * length + 1.
o The encoded string does not contain a leading X'.
Return value Returns the length of the encoded string without the trailing null character.
See also o mysql_real_escape_string(3)
Version 3.3.1 mysql_hex_string(3)