I haven't used php my admin for years but I wouldn't have thought it a much requested feature. Certainly not possible in pure SQL.
$tables = mysql_query('SHOW TABLES');
while ($row = mysql_fetch_assoc($tables)) {
$table = current($row);
$result = mysql_query('SHOW COLUMNS FROM ' . $table);
while ($row = mysql_fetch_assoc($result)) {
if (preg_match('/^varchar\((\d+)\)$/', $row['Type'], $match)
&& $match[1] < 255) {
$sql = 'ALTER TABLE ' . $table . ' CHANGE ' . $row['Field'] . ' '
. $row['Field'] . ' varchar(255)';
if ($row['Null'] == 'NO') {
$sql .= ' NOT NULL';
}
if ($row['Default']) {
$sql .= ' default \'' . mysql_real_escape_string($row['Default']) . '\'';
}
echo $sql, ";\n";
// or uncomment
// mysql_query($sql);
}
}
}