Re: Sanitizing potential MySQL strings with no database connection

From: Date: Tue, 20 Oct 2009 12:54:00 +0000
Subject: Re: Sanitizing potential MySQL strings with no database connection
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.general 
Request: Send a blank email to php-general+get-299097@lists.php.net to get a copy of this message
> Your only option might be to do something "smart". You can't use the proper > mysql functions without a connection to a > database, but you refuse to connect to a database until after you perform validation... > More accurate to say that the file in which the function is stored does not know if there is a connection or not. I would make such a connection if I knew that none exist, but I do not want to interfere with a possibly existing connection. > You do realise you can have several db connections open at one time, so you could have one > always open for the > purpose of validation? Potentially wasteful, but the architecture in this idea is a little > different from the norm. > Very wasteful indeed, I cannot be so irresponsible with this server. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il

« previous php.general (#299097) next »