< AS: Setting Keyword   (Previous) Table of Contents (Next)   Concatenation: Operators >

AS: Getting Keyword

/**
 * Returns the SQL keyword signifying identifier aliases
 *
 * @return  string   the query fragment your DBMS needs
 */
function getAsKeyword() {
    return $this->AsKeyword;
}

require 'connect.inc';

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