Explorar el Código

force correct order for views on some systems (#3)

chansizzle hace 4 años
padre
commit
55875b3605
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      sql_query_result.php

+ 1 - 1
sql_query_result.php

@@ -61,7 +61,7 @@
 //get allowed table names
 	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;