Re: Using mysql_real_escape_string without connecting to mysql
| From: | Richard Lynch | Date: | Wed, 23 Jan 2008 01:50:17 +0000 |
| Subject: | Re: Using mysql_real_escape_string without connecting to mysql | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-267882@lists.php.net to get a copy of this message | ||
On Tue, January 22, 2008 7:01 pm, Dotan Cohen wrote:
> I have a file of my own functions that I include in many places. One
> of them uses mysql_real_escape_string, however, it may be called in a
> context that will or will not connect to a mysql server, and worse,
> may already be connected. So I must avoid connecting. However, when I
> run the script without connecting I get this error:
Don't do that?
:-)
Can the file really do anything useful without the DB?
When there *IS* a connection, how do you access it?
Can't the file check somehow?
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?