getTotalRows ignoring orderby
I'm having some difficulty retrieving an accurate count of pods data for a specific page. I have the following call for data:
$breakout_offer->findRecords($orderby = 't.id ASC', -1, 'link.ID LIKE "' . $currentPageID . '"'); $total_offers = $breakout_offer->getTotalRows();
However the value of $total_offers is always 16, the total number of entries in the pod rather than just how many match the criteria in the findRecords call. Any ideas?
I should add that the correct data displays on the page (anything selected in a pick filter for that specific WP page) but the getTotalRows just isn't returning the same number of results.
edited Mar 9 '11 at 5:32
4 Answers
Added in Pods 1.9.5 - Look for it in the $breakout_offer->total variable
I don't know if this helps you, but I had problems getting the right results from getTotalRows(), if I did different Queries after one another. I then deactivated the PodCache by setting $cache_enabled = false in the PodCache.php. Now it works fine, the speed is good too. I'm using Pods 1.9.4.
Cheers Julian
What version of Pods are you using? This was a bug, but should be fixed if you upgrade to 1.9.4.
Still looking for a solution to this. Using the latest version of pods.


