|
@ -284,7 +284,7 @@ func GetData(dbName, table string, title string, where map[string]string, limit |
|
|
* @param dbName 数据表名 |
|
|
* @param dbName 数据表名 |
|
|
* @param title 查询字段名 |
|
|
* @param title 查询字段名 |
|
|
*/ |
|
|
*/ |
|
|
func GetRow(dbName, table_name, alias string, titles string, join [][]string, where, where_or []string, valueList []interface{}, orderby, gruopby string, debug bool) (int, map[string]string, error) { |
|
|
|
|
|
|
|
|
func GetRow(dbName, table_name, alias string, titles string, join [][]string, where, where_or []string, valueList []interface{}, orderby, groupby string, debug bool) (int, map[string]string, error) { |
|
|
var count int = 0 |
|
|
var count int = 0 |
|
|
info := make(map[string]string) |
|
|
info := make(map[string]string) |
|
|
|
|
|
|
|
@ -334,8 +334,8 @@ func GetRow(dbName, table_name, alias string, titles string, join [][]string, wh |
|
|
sql_str = helper.StringJoin(sql_str, strings.Join(where_or, " or ")) |
|
|
sql_str = helper.StringJoin(sql_str, strings.Join(where_or, " or ")) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if gruopby != "" { |
|
|
|
|
|
sql_str = helper.StringJoin(sql_str, " gruop by ", gruopby) |
|
|
|
|
|
|
|
|
if groupby != "" { |
|
|
|
|
|
sql_str = helper.StringJoin(sql_str, " group by ", groupby) |
|
|
} |
|
|
} |
|
|
if orderby != "" { |
|
|
if orderby != "" { |
|
|
sql_str = helper.StringJoin(sql_str, " order by ", orderby) |
|
|
sql_str = helper.StringJoin(sql_str, " order by ", orderby) |
|
@ -424,7 +424,7 @@ func GetRow(dbName, table_name, alias string, titles string, join [][]string, wh |
|
|
* @param dbName 数据表名 |
|
|
* @param dbName 数据表名 |
|
|
* @param title 查询字段名 |
|
|
* @param title 查询字段名 |
|
|
*/ |
|
|
*/ |
|
|
func FetchRows(dbName, table_name, alias string, titles string, join [][]string, where, where_or []string, valueList []interface{}, orderby, gruopby string, page int, page_size int, debug bool) (int, []map[string]string, error) { |
|
|
|
|
|
|
|
|
func FetchRows(dbName, table_name, alias string, titles string, join [][]string, where, where_or []string, valueList []interface{}, orderby, groupby string, page int, page_size int, debug bool) (int, []map[string]string, error) { |
|
|
var count int = 0 |
|
|
var count int = 0 |
|
|
list := make([]map[string]string, 0) |
|
|
list := make([]map[string]string, 0) |
|
|
|
|
|
|
|
@ -475,8 +475,8 @@ func FetchRows(dbName, table_name, alias string, titles string, join [][]string, |
|
|
sql_str = helper.StringJoin(sql_str, strings.Join(where_or, " or ")) |
|
|
sql_str = helper.StringJoin(sql_str, strings.Join(where_or, " or ")) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if gruopby != "" { |
|
|
|
|
|
sql_str = helper.StringJoin(sql_str, " gruop by ", gruopby) |
|
|
|
|
|
|
|
|
if groupby != "" { |
|
|
|
|
|
sql_str = helper.StringJoin(sql_str, " group by ", groupby) |
|
|
} |
|
|
} |
|
|
if orderby != "" { |
|
|
if orderby != "" { |
|
|
sql_str = helper.StringJoin(sql_str, " order by ", orderby) |
|
|
sql_str = helper.StringJoin(sql_str, " order by ", orderby) |
|
|