Welcome Guest, Not a member yet? Register   Sign In
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



Theme © iAndrew 2016 - Forum software by © MyBB