Re: mysql_real_escape_string paranoid enough?

From: Date: Sat, 21 Mar 2009 22:52:00 +0000
Subject: Re: mysql_real_escape_string paranoid enough?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-290513@lists.php.net to get a copy of this message
On Sat, 2009-03-21 at 15:37 -0700, mike wrote: > 2009/3/21 Nisse Engström <news.NOSPAM.0ixbtqKe@luden.se>: > > > I tend to use the escape functions in very close proximity to > > the actual query, so I don't see a problem with supplying a > > connection identifier. > > Except unless explicitly specified, my applications do not require a > connection identifier as it is stored in a global variable (I have a > nifty little database access layer) Yes, I'm a big fan of automatic database connection identifiers. Why just the other week I was integrating ZenCart into another system and I couldn't understand why ZenCart wasn't able to properly retrieve the last_insert_id(). After digging throught he code I found it was because they were making use of magic identifier semantics and since another db connection also existed, it was being used for the last_insert_id(). Wonderful stuff. If you have a niftly little database layer, then it shouldn't need magic semantics since it should track the connection itself. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP

« previous php.general (#290513) next »