[Easymod-cvs] sql_parser/root/includes/sql sql_builder_mssql.php,1.3,1.4 sql_builder_mysql.php,1.3,1
Status: Beta
Brought to you by:
wgeric
From: Markus P. <mar...@us...> - 2005-11-04 05:44:41
|
Update of /cvsroot/easymod/sql_parser/root/includes/sql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26860/root/includes/sql Modified Files: sql_builder_mssql.php sql_builder_mysql.php sql_parser.php Log Message: fixed a couple of issues. Index: sql_builder_mysql.php =================================================================== RCS file: /cvsroot/easymod/sql_parser/root/includes/sql/sql_builder_mysql.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sql_builder_mysql.php 26 Sep 2005 09:59:13 -0000 1.3 --- sql_builder_mysql.php 4 Nov 2005 05:44:33 -0000 1.4 *************** *** 33,36 **** --- 33,40 ---- $column_data['unsigned'] = true; } + else + { + $datatype .= '(' . implode(', ', $column_data['datatype_argv']) . ')'; + } return $datatype; } Index: sql_builder_mssql.php =================================================================== RCS file: /cvsroot/easymod/sql_parser/root/includes/sql/sql_builder_mssql.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sql_builder_mssql.php 26 Sep 2005 09:59:13 -0000 1.3 --- sql_builder_mssql.php 4 Nov 2005 05:44:33 -0000 1.4 *************** *** 94,101 **** $column_definition = $column_data['name'] . ' ' . $this->translate_datatype($column_data); ! if( !empty($column_data['null']) ) ! { ! $column_definition .= ' ' . $column_data['null']; ! } if( isset($column_data['default']) ) { --- 94,101 ---- $column_definition = $column_data['name'] . ' ' . $this->translate_datatype($column_data); ! // According to the MSSQL manual (chapter "Nullability Rules Within a Table Definition") ! // It is recommended to explicitly define the nullability attribute of columns. ! $column_definition .= ' ' . ( empty($column_data['null']) ? 'NULL' : $column_data['null'] ); ! if( isset($column_data['default']) ) { Index: sql_parser.php =================================================================== RCS file: /cvsroot/easymod/sql_parser/root/includes/sql/sql_parser.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sql_parser.php 29 Sep 2005 19:32:21 -0000 1.4 --- sql_parser.php 4 Nov 2005 05:44:33 -0000 1.5 *************** *** 1852,1856 **** // Convert array into a long string again. ! $sql_string = implode('', $sql_array); // Remove C-style comments, introduced by /* and ended with */ --- 1852,1856 ---- // Convert array into a long string again. ! $sql_string = implode(' ', $sql_array); // Remove C-style comments, introduced by /* and ended with */ |