Skip to content

Commit

Permalink
Fixed issue with Paging count SQL - thanks serbrech
Browse files Browse the repository at this point in the history
  • Loading branch information
subsonic committed Sep 28, 2011
1 parent 34a1aa2 commit b8c27c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Massive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ private static string BuildSelect(string where, string orderBy, int limit) {
/// </summary>
public virtual dynamic Paged(string where = "", string orderBy = "", string columns = "*", int pageSize = 20, int currentPage = 1, params object[] args) {
dynamic result = new ExpandoObject();
var countSQL = string.Format("SELECT COUNT({0}) FROM {1}", PrimaryKeyField, TableName);
var countSQL = string.Format("SELECT COUNT({0}) FROM {1} ", PrimaryKeyField, TableName);
if (String.IsNullOrEmpty(orderBy))
orderBy = PrimaryKeyField;

Expand Down

0 comments on commit b8c27c7

Please sign in to comment.