Open Source RDBMS - Seamless, Scalable, Stable and Free

English | Login |Register


0
(click on this box to dismiss)

How do I escape strings in PHP to pass binary data to a table via an insert or update statement ?

This is on the back of my previous question, it would be important for Cubrid to have a similar function to  mysql_escape_string for passing of binary information to an SQL statement.

How should I do this in the interim, I have already done the normal replace single quotes with double single quotes.


링크 댓글 쓰기 (3)
질문시간 2년 전
andrevanzuydam
26
If the following answer answers your question, please accept it. Otherwise, let us know more in the comments. - [레벨:8]CUBRID 2년 전
I have a problem, I get back a blank result for some strings that I pass to cubrid_real_escape_string, this is a bit of a gray area as I do not know what the rules are about which text I can pass and which text I cannot. If I pass and image contents using this method the insert does not work as I get a blank return, An easy test is to try insert an image into a blob field escaping the data with cubrid_real_escape_string, the insert fails. - [레벨:2]andrevanzuydam 2년 전
Why do you need to escape binary data? - [레벨:8]CUBRID 2년 전
89 답변들
0

mysql_escape_string() function has been deprecated as of PHP 5.3. mysql_real_escape_string() should be used instead.

In CUBRID PHP API there is a compatible cubrid_real_escape_string() function to escape strings. You can use it.

링크 댓글 쓰기 (0)
답변시간 2년 전
dba
558
tagged




You are either using a very old browser or a browser that is not supported.
In order to browse cubrid.org you need to have one of the following browsers:



Internet Explorer: Mozilla Firefox: Google Chrome: