nette/database

Selection->page bug

Closed this issue · 3 comments

  • bug report? yes
  • feature request? no

Description

Paging doesn't take into account GROUP.

Example

$selection = $database->table('table1')
->group('column');

$selection->page sets the $numOfPages to $selection->count(''), which is just
SELECT count(*) FROM table1,
where it should be

SELECT count(*)
 FROM table1 
GROUP BY column
dg commented

I don't understand.

Should be understandable now :)

Ok, my pull request fixed the selection in 2.4. nette so I dont know if it is fixed in the upcoming release or not.