FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » store backslash in mysql database
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: store backslash in mysql database [message #170689 is a reply to message #170688] Sun, 14 November 2010 23:18 Go to previous messageGo to previous message
Peter is currently offline  Peter
Messages: 15
Registered: March 2003
Karma:
Junior Member
In article <MPG(dot)274a7c95e2d635f19896dc(at)news(dot)virginmedia(dot)com>,
pete(dot)ivesAll_stRESS(at)blueyonder(dot)co(dot)uk says...
> In article <4ce02cdd$0$19902$91cee783(at)newsreader03(dot)highway(dot)telekom(dot)at>,
> usenet(at)helmutchang(dot)at says...
>> Am 14.11.2010 18:11, schrieb Peter:
>>
>>
>> The bug is not in the part of the encryption script. It is in the part,
>> where the encrypted data is stored to the database.
>>
>>> So, all I could potentially do, as I see it, is include an extra:
>>>
>>> if, char converted to backslash, then change to a different char.
>>
>> No! Haven't you read the other answers, concerning
>> <http://www.php.net/manual/en/function.mysql-real-escape-string.php>?
>>
>> There are some characters in strings and blobs, that have to be escaped
>> when used in a (My)SQL query. And it's not only the backslash. This
>> function does it for you in the correct way! *But*: The escape sequences
>> are *not* stored in the database. So when you fetch the value again, it
>> is exactly as you want it.
>>
> Sorry, I got a little thrown of the scent here for
> mysql_real_escape_string when the disagreements started. I've now taken
> a look at the function and it does seem ideal for my purposes.
>
>

Sorry to reply to my own post but...

Having read right to the very end, when they say \n is replaced by '\n'
litteral, what do they mean? If that means the \n is replaced by a
completely different MySQL representation of \n, then is it still going
to work for me?

--
Pete Ives
Remove All_stRESS before sending me an email
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: website url as input how to create and save image on server in php?
Next Topic: Cannot write utf8 data into a utf8 column
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 22:04:52 GMT 2024

Total time taken to generate the page: 0.03241 seconds