At 11:06 AM -0500 9/28/06, Richard Lynch wrote:
> What's up with that? Any ideas as to what happened?
One also has to ask WHY you would use MySQL's escaping for data that's
not going into MySQL.
That's almost certainly "wrong"
Richard:
Yes, according to:
http://us3.php.net/mysql_real_escape_string
The use of the statement looks for a MySQL connection and if there
isn't one, it tries to connect and thus producing the error I got
when it failed.
The answer to "WHY" I did it is that I cut/pasted the code from
another script. I was only concerned with cleaning the input and not
with using MySQL -- it was just one statement in several to scrub
various inputs.
However, I would have thought that if the code was going to fail, it
would have done so immediately. But it instead, it ran for weeks
without failure until just a few days ago. I checked the script
almost daily to see if it ran.
While it seems very unlikely to me, I must have also tested code that
opened a MySQL connection before testing that script. Strange
circumstances.
Thanks for the clarification.
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php