(Drizzle) Listing/change table structure small fix
This commit is contained in:

committed by
Michal Čihař

parent
3c8b3af512
commit
5afcef00e6
@@ -170,7 +170,9 @@ if ($abort == false) {
|
|||||||
*/
|
*/
|
||||||
for ($i = 0; $i < $selected_cnt; $i++) {
|
for ($i = 0; $i < $selected_cnt; $i++) {
|
||||||
$_REQUEST['field'] = PMA_sqlAddslashes($selected[$i], true);
|
$_REQUEST['field'] = PMA_sqlAddslashes($selected[$i], true);
|
||||||
$result = PMA_DBI_query('SHOW FULL COLUMNS FROM ' . PMA_backquote($table) . ' FROM ' . PMA_backquote($db) . ' LIKE \'' . $_REQUEST['field'] . '\';');
|
$result = PMA_DRIZZLE
|
||||||
|
? PMA_DBI_query('SHOW COLUMNS FROM ' . PMA_backquote($table) . ' FROM ' . PMA_backquote($db) . ' WHERE Field = \'' . $_REQUEST['field'] . '\';')
|
||||||
|
: PMA_DBI_query('SHOW FULL COLUMNS FROM ' . PMA_backquote($table) . ' FROM ' . PMA_backquote($db) . ' LIKE \'' . $_REQUEST['field'] . '\';');
|
||||||
$fields_meta[] = PMA_DBI_fetch_assoc($result);
|
$fields_meta[] = PMA_DBI_fetch_assoc($result);
|
||||||
PMA_DBI_free_result($result);
|
PMA_DBI_free_result($result);
|
||||||
}
|
}
|
||||||
|
@@ -121,10 +121,11 @@ foreach (PMA_Index::getFromTable($table, $db) as $index) {
|
|||||||
unset($index, $columns, $column_name, $dummy);
|
unset($index, $columns, $column_name, $dummy);
|
||||||
|
|
||||||
// 3. Get fields
|
// 3. Get fields
|
||||||
$fields_rs = PMA_DBI_query('SHOW FULL FIELDS FROM ' . PMA_backquote($table) . ';', null, PMA_DBI_QUERY_STORE);
|
$fields_rs = PMA_DRIZZLE
|
||||||
|
? PMA_DBI_query('SHOW COLUMNS FROM ' . PMA_backquote($table) . ';', null, PMA_DBI_QUERY_STORE)
|
||||||
|
: PMA_DBI_query('SHOW FULL FIELDS FROM ' . PMA_backquote($table) . ';', null, PMA_DBI_QUERY_STORE);
|
||||||
$fields_cnt = PMA_DBI_num_rows($fields_rs);
|
$fields_cnt = PMA_DBI_num_rows($fields_rs);
|
||||||
|
|
||||||
|
|
||||||
// Get more complete field information
|
// Get more complete field information
|
||||||
// For now, this is done just for MySQL 4.1.2+ new TIMESTAMP options
|
// For now, this is done just for MySQL 4.1.2+ new TIMESTAMP options
|
||||||
// but later, if the analyser returns more information, it
|
// but later, if the analyser returns more information, it
|
||||||
|
Reference in New Issue
Block a user