Tim Johnson wrote:
Not sure what you mean by "directly usable".
I mean "directly usable". :)
If I do an insert statement with a backslash, for example: "headline\one", I will retrieve "headline\\one", and that will need to be unescaped, because it is not a true representation of what was submitted by the original insert.
My perspective is a little different from yours: as the maintainer of MySQL++ (http://tangentsoft.net/mysql++/), I have never actually used the C API directly. I don't have any pure C sample code here to tweak to try things.
Instead, I changed one of the MySQL++ examples to insert a string with a backslash into the DB, and on retrieving the rows, I get a single backslash. In the C++ code, the backslash is doubled due to C/C++ string parsing rules, but that's only one character in the underlying string data. Due to the way this example uses MySQL++, that string gets automatically escaped on DB insertion, so I presume it's sent over the wire as two backslashes, though I haven't verified it. Then when you retrieve rows through MySQL++, it returns a fairly direct copy of the data the C API gives you, with no real translation going on.
MySQL++ doesn't have an "unescape" function, so I don't see why your program would need one.
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]