note 114943 deleted from mysqli.real-escape-string by cmb
| From: | cmb@php.net | Date: | Wed, 24 Jul 2019 13:34:13 +0000 |
| Subject: | note 114943 deleted from mysqli.real-escape-string by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-211693@lists.php.net to get a copy of this message | ||
Note Submitter: nmmm at nmmm dot nu
----
Note unlike PDO string escape, MySQLi does not include apostrophes.
So, you probably want something like this:
function escape($s){
$s = $this->mysqli->real_escape_string($s);
return "'$s'";
}