Файл: MysqlIManager/addfield2.php
Строк: 42
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Add new field to table <?php print("$TABLE"); ?></title>
<link rel="stylesheet" href="settings.css" type="text/css">
</head>
<body>
<br><br><br>
<center>
<?php
include("common.inc");
mysql_select_db($DB, $connection);
if($type == 'TEXT') {
$type = 'TEXT';
}
elseif($type == 'BLOB') {
$type = 'BLOB';
}
elseif($type == 'LONGBLOB') {
$type = 'LONGBLOB';
}
elseif($type == 'TINY') {
$type = 'TINY';
}
else {
$type = "$type($Length)";
}
if(($type == 'TEXT' AND
$Length != '')) {
print("No need to give a length when defining as TEXT, <a href="javascript: history.back();">back</a>");
}
elseif(($type == 'BLOB' AND
$Length != '')) {
print("No need to give a length when defining as BLOB, <a href="javascript: history.back();">back</a>");
}
elseif(($type == 'LONGBLOB' AND
$Length != '')) {
print("No need to give a length when defining as LONGBLOB, <a href="javascript: history.back();">back</a>");
}
else {
$query = "ALTER TABLE $TABLE ADD COLUMN $COLUMN $type $Flag";
$result = mysql_query($query) or die("ERROR while adding new column, please check your flags.");
print("New field has been added succesfully!");
}
?>
</center>
</body>
</html>