Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted February 17, 20177 yr Hello, guys, I think that I found a small problem with system/Helpers/Table/Db.php: /* Count results (for pagination) */ $count = \IPS\Db::i()->select( 'count(*)', $this->table, $where ); and... $count = $count->first(); This method of counting lines not works properly when we use "GROUP BY" clause. May be better: $count = \IPS\Db::i()->select( 'count(*)', $this->table, $where, NULL, NULL, $this->group ); //... $count = $count->count(); Thank you in advance.
February 19, 20177 yr Author Finally my solution is: if ( count( $this->group ) ) { $count = $count->count(); } else { $count = $count->first(); }
February 20, 20177 yr This looks like a bug, open a ticket in your client area and report it there, if you do the fix will be included in .19 most likely. They don't check this forum as often.
February 20, 20177 yr Author Dear friends, I have no idea how to deal with support because it's not funny :-D I decided to post about this thing there and wait for comment from developers :-)
February 20, 20177 yr Well, since this is a bug and bug reports must be made opening a ticket in the client area since a while ago (they closed the public bug tracker, only IPS staff can post there now): https://www.invisionpower.com/clientarea/support/ This forum is to actually ask IPS developers to implement changes in the framework so that us 3rd party developers can access specific areas, data, code and so on. They only check it from time to time and not constantly like tickets.
February 21, 20177 yr 13 hours ago, Ryan H. said: This bug also affects my AT&P app. Take one for the team and report it?
February 21, 20177 yr Someone affected will most likely need to submit a ticket with a specific example.
February 22, 20177 yr 20 hours ago, bfarber said: Someone affected will most likely need to submit a ticket with a specific example. @bfarber Done #975542
February 23, 20177 yr have anyone tested with count(TRUE) and \IPS\Db::SELECT_SQL_CALC_FOUND_ROWS flags?
February 24, 20177 yr GROUP_BY will be abandoned for 4.2. Does the workaround noted by Matt resolve the counting issue?
Archived
This topic is now archived and is closed to further replies.