< Escaping Input   (Previous) Table of Contents (Next)   Column Name Case >

Escaping Input: Example

require 'connect.inc';

$query = 'SELECT cf FROM t WHERE cf = ' . $db->quoteSmart("That's");
echo "$query\n";
$out = $db->getOne($query);
echo $out;
mysql
SELECT cf FROM t WHERE cf = 'That\'s'
That's
oci8
SELECT cf FROM t WHERE cf = 'That''s'
That's