Flourish PHP Unframework
This is an archived copy of the forum for reference purposes

db escape

posted by darren 8 years ago


is this normal behaviour...

$db->escape('string', "testing 

which creates a string literal of 'testing
n 123' and is inserted into the DB as is?

this means i will have to string or preg replace every occurance in order to display it back which surely cant be right...

i was expecting it to be stored in the db as


am i missing something?

What type of database are you using, and what version?

Are you actually getting the
n out when you query the database, or are you just seeing it in the generated SQL?

posted by wbond 8 years ago

Hi Will,

I am using mysql 4.1.xx yeh i know super old but nothing i can do with this AIX box as no root access :(

Yes the
n comes out on the query...

If i do it via place holders the query looks the same but does not suffer the same problem as using escape...


posted by darren 8 years ago

Can you paste the exact code that is working, and also the code that isn't that you would expect to work?

What version of PHP are you running on this AIX box? Unfortunately I don't have any access to AIX boxes, but if you can figure out what it causing the issue, I'd be happy to test a fix across all of the machines I do have.

posted by wbond 8 years ago

Hi Will,

I will duplicate the code as soon as i can... busy with so much stuff.

I do appreciate all your help.

Many Thanks.

posted by darren 8 years ago