note 49268 deleted from function.mysql-real-escape-string by danbrown
| From: | danbrown@php.net | Date: | Sat, 14 Mar 2009 15:11:00 +0000 |
| Subject: | note 49268 deleted from function.mysql-real-escape-string by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-151944@lists.php.net to get a copy of this message | ||
Note Submitter: boris-pieper AT t-online DOT de
----
well, smth like that
<?php
function escape_string ($string,$dbcon=false) {
if(version_compare(phpversion(),"4.3.0")=="-1") {
mysql_escape_string($string);
} elseif ($dbcon) {
mysql_real_escape_string($string,$dbcon);
} else { return false; }
}
?>