diff options
author | Dan Ungureanu <udan1107@gmail.com> | 2015-09-25 10:52:38 +0300 |
---|---|---|
committer | Dan Ungureanu <udan1107@gmail.com> | 2015-09-25 11:00:29 +0300 |
commit | 1415469b34b1fc33189e2c801302597b5b50f704 (patch) | |
tree | 44030954915aea36401a61d3a35f5609f25d176d /src/Utils/Table.php | |
parent | 9098d370993b98c93d3b0be6e737e31ea20846fe (diff) | |
download | sql-parser-1415469b34b1fc33189e2c801302597b5b50f704.zip sql-parser-1415469b34b1fc33189e2c801302597b5b50f704.tar.gz sql-parser-1415469b34b1fc33189e2c801302597b5b50f704.tar.bz2 |
Better parsing for CREATE TABLE statements.v2.0.0
Fixes #16.
Diffstat (limited to 'src/Utils/Table.php')
-rw-r--r-- | src/Utils/Table.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Utils/Table.php b/src/Utils/Table.php index 81699ad..5f0858d 100644 --- a/src/Utils/Table.php +++ b/src/Utils/Table.php @@ -45,9 +45,14 @@ class Table continue; } + $columns = array(); + foreach ($field->key->columns as $column) { + $columns[] = $column['name']; + } + $tmp = array( 'constraint' => $field->name, - 'index_list' => $field->key->columns, + 'index_list' => $columns, ); if (!empty($field->references)) { |