getTotalRows ignoring orderby

0

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.

asked Mar 9 '11 at 5:31

grumpypine

3

edited Mar 9 '11 at 5:32

Still trying to figure this out. using v 1.9.4 – grumpypine Mar 16 '11 at 3:51
add comment
enter at least 15 characters

4 Answers

2

Added in Pods 1.9.5 - Look for it in the $breakout_offer->total variable

answered Apr 6 '11 at 11:01

sc0ttkclark

2936

Thanks Scott- updated and used the total variable. Worked great! – grumpypine Apr 8 '11 at 7:15
add comment
enter at least 15 characters
1

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

answered Apr 4 '11 at 10:20

julianh

11

add comment
enter at least 15 characters
0

What version of Pods are you using? This was a bug, but should be fixed if you upgrade to 1.9.4.

answered Mar 11 '11 at 4:19

clarinetlord

456

I am using 1.9.4 – grumpypine Mar 15 '11 at 3:20
add comment
enter at least 15 characters
0

Still looking for a solution to this. Using the latest version of pods.

answered Mar 26 '11 at 5:19

grumpypine

3

add comment
enter at least 15 characters