• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
count_all_results() with complex WHERE clause

#3
[eluser]Nicolas Connault[/eluser]
Thanks crikey, nice to to see a fellow Aussie on the forum Smile

Your suggestion is fine, except that in addition to pagination limits, I also have optional WHERE conditions based on that blasted custom field, which cannot be built if I use count_all_results (because it only includes COUNT(*) in the SELECT clause).

I guess that one solution would be to eliminate the need to select the custom field, by saving its value in one of the tables. That would create duplication of data though, and I'm really not keen on that.


Messages In This Thread
count_all_results() with complex WHERE clause - by El Forum - 11-29-2010, 10:27 PM
count_all_results() with complex WHERE clause - by El Forum - 11-29-2010, 11:15 PM
count_all_results() with complex WHERE clause - by El Forum - 11-29-2010, 11:20 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.