Re: store backslash in mysql database [message #170742 is a reply to message #170734] |
Wed, 17 November 2010 16:52 |
Magno
Messages: 49 Registered: October 2010
Karma:
|
Member |
|
|
On 11/17/2010 01:29 PM, Jerry Stuckle wrote:
> On 11/17/2010 6:53 AM, Luuk wrote:
>> On 17-11-10 12:28, Jerry Stuckle wrote:
>>> There is NO indication that the encryption routine was written in PHP or
>>> some other language; if it was another language, there can be other
>>> problems which mysql_real_escape_string() cannot fix - because it is
>>> depending on the string being created correctly in PHP.
>>
>> Can you explain to us the difference between:
>> 1) A string (http://en.wikipedia.org/wiki/String_(computer_science))
>> and
>> 2) A string created by PHP
>>
>> I'm really interested in the differences between both,
>> because, to my knowledge, there is no difference.
>> And i hope my knowledge about this is correct.
>>
>
> Luuk, the problem comes in when a string is created outside of PHP but
> not according to the "rules". For instance, if the string contains the
> character sequence "\n" and is placed in a PHP string incorrectly (as
> can happen with extensions), the string may be interpreted as the two
> character sequence (correct), or it may be interpreted as a newline
> character - IOW, it could be interpreted as either "\n" or '\n'.
>
> The solution here is to correct the code such that it inserts the
> sequence correctly. And no, this is not theoretical - I had to
> troubleshoot this very problem in an extension a while back - it wasn't
> easy to find, mainly because we didn't at first suspect this was the
> problem.
>
You are bringing up a problem that the OP hasn’t asked about, it is not
likely to happen in what he his doing, and no one has even mentioned about.
Please don’t confuse the OP more.
|
|
|