note 116049 rejected from function.mysql-real-escape-string by tularis

From: Date: Tue, 04 Nov 2014 12:00:58 +0000
Subject: note 116049 rejected from function.mysql-real-escape-string by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-200780@lists.php.net to get a copy of this message
Note Submitter: molavi dot esmail at gmail dot com ---- Why my code doesn't work؟ function escape($str) { $db=new sql(); if(is_numeric($str)) return $str; else return mysql_real_escape_string($db->connection(),$str); } function connection in class is: public function connection() { $this->connect = mysqli_connect(''localhost","myuser","mypass","mydb"); return $this->connect; }

« previous php.notes (#200780) next »