Re: store backslash in mysql database [message #170743 is a reply to message #170742] |
Thu, 18 November 2010 13:18 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 11/17/2010 11:52 AM, Magno wrote:
> 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.
And you are being a stupid shit. The operator only indicated he found
some code. He did not indicate where it came from, what language it is
in, or anything else.
The problem I mentioned is ONE EXAMPLE of what can happen. Similar
things can happen other ways, also. But you're too stoopid to
understand what can happen when you have mixed languages.
Give it up - you're only proving your ignorance.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|