DB_common::escapeSimple() -- Escapes a string according to the current DBMS's standards
Beschreibung
Escape a string according to the current DBMS's standards.
Parameter
- string
$str
the input to be escaped
Rückgabewert
string - the escaped string
Hinweise
Diese Methode kann nicht
statisch aufgerufen werden.
Function available since: Release 1.6.0
Beispiel
Beispiel 34-1. Using escapeSimple() <?php
// Once you have a valid DB object named $db...
$name = "all's well";
$sql = "SELECT * FROM clients WHERE name = '"
. $db->escapeSimple($name) . "'";
$res =& $db->query($sql);
?> |
|