Re: Using mysql_real_escape_string without connecting to mysql

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

 



On 23/01/2008, James Ausmus <james.ausmus@xxxxxxxxx> wrote:> Try using the mysql_ping() command to check to see if your connection> is available:>> http://us2.php.net/manual/en/function.mysql-ping.php>> something like:>> <?php>> if (!@mysql_ping()) //Note the @ is because, if mysql_ping cannot get> connected, it will display a warning - suppress so users don't see> {>   connectToDB();> }>> mysql_real_escape_string('stuff');>> ?>>> HTH->> James>
I was thinking about that, but the problem is that if there is noconnection, then the include is called and doesn't provide themysql_clean function that I expect that it would. Then, I make aconnection and use the function, expecting it to clean my data and itdoesn't.
Dotan Cohen
http://what-is-what.comhttp://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?

[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