Ver código fonte

force views order to the end on some systems (#4)

chansizzle 4 anos atrás
pai
commit
aca0541434
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      sql_query.php

+ 1 - 1
sql_query.php

@@ -184,7 +184,7 @@
 	echo "						<option value=''></option>\n";
 	switch ($db_type) {
 		case 'sqlite': $sql = "select name from sqlite_master where type='table' order by name;"; break;
-		case 'pgsql': $sql = "select table_name as name from information_schema.tables where table_schema='public' and (table_type='BASE TABLE' or table_type='VIEW') order by table_name"; break;
+		case 'pgsql': $sql = "select table_name as name from information_schema.tables where table_schema='public' and (table_type='BASE TABLE' or table_type='VIEW') order by table_type, table_name"; break;
 		case 'mysql': $sql = "show tables"; break;
 	}
 	$database = new database;