DB_common::escapeSimple() -- Escapes a string according to the current DBMS's standards
Descripción
Escape a string according to the current DBMS's standards.
Parámetro
- string
$str
the input to be escaped
Valor devuelto
string - the escaped string
Nota
Esta función no puede ser llamada
estáticamente.
Function available since: Release 1.6.0
Ejemplo
Ejemplo 35-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);
?> |
|