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