$sval) { $i++; switch ($what) { case 'row_delete': $full_query .= htmlspecialchars(urldecode($sval)) . ';
'; break; case 'drop_db': $full_query .= 'DROP DATABASE ' . PMA_backquote(htmlspecialchars(urldecode($sval))) . ';
'; break; case 'drop_tbl': $full_query .= (empty($full_query) ? 'DROP TABLE ' : ', ') . PMA_backquote(htmlspecialchars(urldecode($sval))) . (($i == $selected_cnt - 1) ? ';
' : ''); break; case 'empty_tbl': if (PMA_MYSQL_INT_VERSION >= 40000) { $full_query .= 'TRUNCATE '; } else { $full_query .= 'DELETE FROM '; } $full_query .= PMA_backquote(htmlspecialchars(urldecode($sval))) . ';
'; break; case 'drop_fld': if ($full_query == '') { $full_query .= 'ALTER TABLE ' . PMA_backquote(htmlspecialchars($table)) . '
  DROP ' . PMA_backquote(htmlspecialchars(urldecode($sval))) . ','; } else { $full_query .= '
  DROP ' . PMA_backquote(htmlspecialchars(urldecode($sval))) . ','; } if ($i == $selected_cnt-1) { $full_query = preg_replace('@,$@', ';
', $full_query); } break; } // end switch } // Displays the form echo $strDoYouReally . ' :
' . "\n"; echo '' . $full_query . ' ?
' . "\n"; ?>
$sval) { echo ' ' . "\n"; } ?> ' . "\n"; echo '' . "\n"; echo '' . "\n"; } ?>
= 40000) { $a_query = 'TRUNCATE '; } else { $a_query = 'DELETE FROM '; } $a_query .= PMA_backquote(htmlspecialchars(urldecode($selected[$i]))); break; case 'drop_fld': PMA_relationsCleanupColumn($db, $table, $selected[$i]); $sql_query .= (empty($sql_query) ? 'ALTER TABLE ' . PMA_backquote($table) : ',') . ' DROP ' . PMA_backquote(urldecode($selected[$i])) . (($i == $selected_cnt-1) ? ';' : ''); break; } // end switch // All "DROP TABLE","DROP FIELD", "OPTIMIZE TABLE" and "REPAIR TABLE" // statements will be run at once below if ($query_type != 'drop_tbl' && $query_type != 'drop_fld' && $query_type != 'repair_tbl' && $query_type != 'analyze_tbl' && $query_type != 'optimize_tbl' && $query_type != 'check_tbl') { $sql_query .= $a_query . ';' . "\n"; if ($query_type != 'drop_db') { PMA_mysql_select_db($db); } $result = @PMA_mysql_query($a_query) or PMA_mysqlDie('', $a_query, FALSE, $err_url); } // end if } // end for if ($query_type == 'drop_tbl' || $query_type == 'drop_fld') { PMA_mysql_select_db($db); $result = @PMA_mysql_query($sql_query) or PMA_mysqlDie('', '', FALSE, $err_url); } elseif ($query_type == 'repair_tbl' || $query_type == 'analyze_tbl' || $query_type == 'check_tbl' || $query_type == 'optimize_tbl') { require('./sql.php'); } } ?>