- dao.GetLastTotalRowCount
This commit is contained in:
@@ -170,6 +170,7 @@ func ExecuteSQL(db *DaoDB, sql string, params ...interface{}) (num int64, err er
|
||||
return num, err
|
||||
}
|
||||
|
||||
// 此函数要求db在事务中,否则可能导致取得到的是另一个连接的数据
|
||||
func GetLastTotalRowCount(db *DaoDB) int {
|
||||
countInfo := &struct{ Ct int }{}
|
||||
if err := GetRow(db, countInfo, "SELECT FOUND_ROWS() ct"); err == nil {
|
||||
|
||||
Reference in New Issue
Block a user