0) { $primary = "ADD PRIMARY KEY ($primary)"; $sql_query .= "\nALTER TABLE $table $primary"; $result = mysql_db_query($db, "ALTER TABLE $table $primary") or mysql_die(); } } $index = ''; if (isset($field_index)) { for($i=0;$i 0) { $index = "ADD INDEX ($index)"; $sql_query .= "\nALTER TABLE $table $index"; $result = mysql_db_query($db, "ALTER TABLE $table $index") or mysql_die(); } } $unique = ''; if (isset($field_unique)) { for($i=0;$i 0) { $unique = "ADD UNIQUE ($unique)"; $sql_query .= "\nALTER TABLE $table $unique"; $result = mysql_db_query($db, "ALTER TABLE $table $unique") or mysql_die(); } } $query_keys = $primary.$index.$unique; $query_keys = ereg_replace(", $", "", $query_keys); $message = "$strTable $table $strHasBeenAltered"; include("./tbl_properties.php3"); exit; } else { $action = "tbl_addfield.php3"; include("./tbl_properties.inc.php3"); } require("./footer.inc.php3"); ?>