Man page - mysql_hex_string(3)

Packages contains this manual

Manual

mysql_hex_string

Name
Synopsis
Description
Parameter
Notes
Return value
See also

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

β€’

to - result buffer

β€’

from - the string which will be encoded

β€’

len - length of the string (from)

Notes

β€’

The size of the buffer for the encoded string must be 2 * length + 1.

β€’

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

β€’

mysql_real_escape_string(3)