_sqlCreateTable() protected method

We use this so that certain adapters can append table types to the creation statment (for example MySQL).
protected _sqlCreateTable ( string $table, string $cols ) : string
$table string The table name to create.
$cols string The column definitions.
return string A CREATE TABLE command string.
コード例 #1
0
ファイル: Mysql.php プロジェクト: kalkin/solarphp
 /**
  * 
  * Builds a CREATE TABLE command string.
  * 
  * @param string $name The table name to create.
  * 
  * @param string $cols The column definitions.
  * 
  * @return string A CREATE TABLE command string.
  * 
  */
 protected function _sqlCreateTable($name, $cols)
 {
     $stmt = parent::_sqlCreateTable($name, $cols);
     $stmt .= " TYPE=InnoDB";
     // for transactions
     $stmt .= " DEFAULT CHARSET=utf8 COLLATE=utf8_bin";
     // for UTF8
     return $stmt;
 }