return true;
}
- function fields($table, $hidden = false) {
+ function fields($table) {
$return = array();
foreach (get_rows("SELECT c.*, t.name type, d.definition [default]
FROM sys.all_columns c
/** Get information about fields
* @param string
- * @param bool display hidden table columns
* @return array array($name => array("field" => , "full_type" => , "type" => , "length" => , "unsigned" => , "default" => , "null" => , "auto_increment" => , "on_update" => , "collation" => , "privileges" => , "comment" => , "primary" => ))
*/
- function fields($table, $hidden = false) {
+ function fields($table) {
$return = array();
foreach (get_rows("SHOW FULL COLUMNS FROM " . table($table)) as $row) {
preg_match('~^([^( ]+)(?:\\((.+)\\))?( unsigned)?( zerofill)?$~', $row["Type"], $match);
return true;
}
- function fields($table, $hidden = false) {
+ function fields($table) {
$return = array();
foreach (get_rows("SELECT * FROM all_tab_columns WHERE table_name = " . q($table) . " ORDER BY column_id") as $row) {
$type = $row["DATA_TYPE"];
return true;
}
- function fields($table, $hidden = false) {
+ function fields($table) {
$return = array();
foreach (get_rows("SELECT a.attname AS field, format_type(a.atttypid, a.atttypmod) AS full_type, d.adsrc AS default, a.attnotnull, col_description(c.oid, a.attnum) AS comment
FROM pg_class c
WHERE c.relname = " . q($table) . "
AND n.nspname = current_schema()
AND NOT a.attisdropped
-" . ($hidden ? "" : "AND a.attnum > 0") . "
-ORDER BY a.attnum < 0, a.attnum"
+AND a.attnum > 0
+ORDER BY a.attnum"
) as $row) {
//! collation, primary
ereg('(.*)(\\((.*)\\))?', $row["full_type"], $match);
return !$connection->result("SELECT sqlite_compileoption_used('OMIT_FOREIGN_KEY')");
}
- function fields($table, $hidden = false) {
+ function fields($table) {
$return = array();
foreach (get_rows("PRAGMA table_info(" . table($table) . ")") as $row) {
$type = strtolower($row["type"]);
$TABLE = $_GET["select"];
$table_status = table_status($TABLE);
$indexes = indexes($TABLE);
-$fields = fields($TABLE, 1); // 1 - hidden
+$fields = fields($TABLE);
$foreign_keys = column_foreign_keys($TABLE);
$rights = array(); // privilege => 0