All available columns

Table: " . $tabledisplay . " (". $tablename .")
"; $sql = "SHOW columns FROM $tablename"; $primary_keys = get_primary_keys($tablename); $auto_keys = get_autoincrement_cols($tablename); $foreign_keys = get_foreign_keys($tablename); $result = mysqli_query($link,$sql); while ($column = mysqli_fetch_array($result)) { $column_type = get_col_types($tablename,$column[0]); if (in_array ("$column[0]", $primary_keys)) { $primary = "??"; echo ''; } else { $primary = ""; } if (in_array ("$column[0]", $auto_keys)) { $auto = "??"; echo ''; } else { $auto = ""; } if (in_array ("$column[0]", $foreign_keys)) { $fk = "??"; echo ''; } else { $fk = ""; } echo '
'. $primary . $auto . $fk . $column[0] . '
Visible in overview?
'; $i++; } } } } ?>