< BOOLEAN: Setting Column Type   (Previous) Table of Contents (Next)   BOOLEAN: Casting Results >

BOOLEAN: Getting Column Type

/**
 * Returns the SQL keyword for BOOLEAN data types in CREATE TABLE
 * statements
 *
 * @return  string   the query fragment your DBMS needs
 */
function getBooleanType() {
    return $this->BooleanType;
}

require 'connect.inc';

$query = 'CREATE TABLE xyz (b ' . $p->getBooleanType() . ')';
echo $query;
$db->query($query);
$db->query('DROP TABLE xyz ' . $p->getDropRestrict());
mssql
CREATE TABLE xyz (b TINYINT )
fbsql
CREATE TABLE xyz (b BOOLEAN )