remove trailing commas from schema definitions in create_table()
This commit is contained in:
parent
8f7e4bab3c
commit
10e7dd27d4
1 changed files with 1 additions and 0 deletions
|
@ -680,6 +680,7 @@ class Database {
|
||||||
*/
|
*/
|
||||||
public function create_table($name, $data) {
|
public function create_table($name, $data) {
|
||||||
if(is_null($this->engine)) { $this->connect_engine(); }
|
if(is_null($this->engine)) { $this->connect_engine(); }
|
||||||
|
$data = trim($data, ", \t\n\r\0\x0B"); // mysql doesn't like trailing commas
|
||||||
$this->execute($this->engine->create_table_sql($name, $data));
|
$this->execute($this->engine->create_table_sql($name, $data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue