6
6
* linked from table_structure, uses libraries/tbl_properties.inc.php to display
7
7
* form and handles this form data
9
* @version $Id: tbl_alter.php 11994 2008-11-24 11:22:44Z nijel $
9
* @version $Id: tbl_alter.php 13116 2009-11-13 11:14:10Z lem9 $
10
10
* @package phpMyAdmin
176
176
$num_fields = count($fields_meta);
177
177
$action = 'tbl_alter.php';
179
// Get more complete field information
180
// For now, this is done just for MySQL 4.1.2+ new TIMESTAMP options
181
// but later, if the analyser returns more information, it
182
// could be executed for any MySQL version and replace
183
// the info given by SHOW FULL FIELDS FROM.
179
// Get more complete field information.
180
// For now, this is done to obtain MySQL 4.1.2+ new TIMESTAMP options
181
// and to know when there is an empty DEFAULT value.
182
// Later, if the analyser returns more information, it
183
// could be executed to replace the info given by SHOW FULL FIELDS FROM.
185
185
* @todo put this code into a require()
186
186
* or maybe make it part of PMA_DBI_get_fields();
189
if (PMA_MYSQL_INT_VERSION < 50025) {
190
// We also need this to correctly learn if a TIMESTAMP is NOT NULL, since
191
// SHOW FULL FIELDS says NULL and SHOW CREATE TABLE says NOT NULL (tested
189
// We also need this to correctly learn if a TIMESTAMP is NOT NULL, since
190
// SHOW FULL FIELDS says NULL and SHOW CREATE TABLE says NOT NULL (tested
194
$show_create_table = PMA_DBI_fetch_value(
195
'SHOW CREATE TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table),
197
$analyzed_sql = PMA_SQP_analyze(PMA_SQP_parse($show_create_table));
193
$show_create_table = PMA_DBI_fetch_value('SHOW CREATE TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table), 0, 1);
194
$analyzed_sql = PMA_SQP_analyze(PMA_SQP_parse($show_create_table));
195
unset($show_create_table);
201
198
* Form for changing properties.