MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:August 16 2005 5:53pm
Subject:Re: mysql_hex_string() c-api
View as plain text  
At 19:43 +0200 8/16/05, Danny Stolle wrote:
>Hello all,
>can somebody explain to me the c-api mysql_hex_string().
>when i debug my example in DDD i get the full sql-dml (insert) as a 
>hex-value; which this function returns. putting a 0x in front of the 
>hex and use it in a mysql_real_query() returns an error.
>or am i doing it wrong! should i use the values which are used in 
>the insert-string and convert them into hex using this function?
>the example provided in the documentation is not realy helpfull though.
>hopefully i am clear, otherwise please let me know.

It take an argument string such as "abc" and returns it as a string
representing the hex digits for the characters in the string.

Input: "abc"
Output: "616263"

You should take that result and insert it into a SQL statement where a
data value is allowable, preceded by "0x".  It's not intended that you
pass mysql_hex_string() a complete SQL statement.

Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
mysql_hex_string() c-apiDanny Stolle16 Aug
  • Re: mysql_hex_string() c-apiPaul DuBois16 Aug
    • Re: mysql_hex_string() c-apiDanny Stolle16 Aug