소스 검색

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

chansizzle 4 년 전
부모
커밋
55875b3605
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;