DATE: Getting Column Type
/** * Returns the SQL keyword for DATE data types in CREATE TABLE statements * * @return string the query fragment your DBMS needs */ function getDateType() { return $this->DateType; }
require 'connect.inc';
$query = 'CREATE TABLE xyz (d ' . $p->getDateType() . ')';
echo $query;
$db->query($query);
$db->query('DROP TABLE xyz ' . $p->getDropRestrict());
CREATE TABLE xyz (d DATETIME ) |
CREATE TABLE xyz (d DATE ) |