remove trailing commas from schema definitions in create_table()

This commit is contained in:
Shish 2015-07-02 12:38:33 +01:00
parent 8f7e4bab3c
commit 10e7dd27d4

View file

@ -680,6 +680,7 @@ class Database {
*/
public function create_table($name, $data) {
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));
}