Re: Using mysql_real_escape_string without connecting to mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 23, 2008 2:37 PM, Dotan Cohen <dotancohen@xxxxxxxxx> wrote:> On 23/01/2008, Richard Lynch <ceo@xxxxxxxxx> wrote:> > Back to the original question...> >> > I suppose you could use mysql_escape_string (note the lack of "real")> > in the short term...>> I'd rather not. There is no short term.>> > It would be Real Nifty (tm) if the MySQL API had a function that let> > you specify the charset without a connection and did the escaping.> >> > Presumably you don't NEED a connection if you already know what> > charset thingie you are aiming at...> >> > Or maybe I'm not understanding something...>> You are understanding. I'm heading over to the mysql bugzilla now...>>> Dotan Cohen>> http://what-is-what.com> http://gibberish.co.il> א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת>> A: Because it messes up the order in which people normally read text.> Q: Why is top-posting such a bad thing?>
There isn't a reason to go and report a bug as their stuff works fine.
If you know you have utf8 and all that jazz then fine.  The onlyreason you should use mysql escaping is right before you put a valueinto the database.  To put a value in the database you must have aconnection.  So this really is a non-issue in my opinion.
Look at mysqli or pdo and start working with prepared statements. :)

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux