< Delimiting Identifiers   (Previous) Table of Contents (Next)   Escaping Input >

Delimiting Identifiers: Example

require 'connect.inc';

$query = 'SELECT cf ' . $p->getAsKeyword() . ' '
         . $db->quoteIdentifier('TABLE') . ' FROM t';
echo "$query\n";
$out = $db->getOne($query);
echo $out;
mysql
SELECT cf AS `TABLE` FROM t
That's
pgsql
SELECT cf AS "TABLE" FROM t
That's