CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • getCount broken, query mysql directly?
Pages: [1]

Author Topic: getCount broken, query mysql directly?  (Read 407 times)

karlis

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: drupal 7.12
  • MySQL version: 5.1.63
  • PHP version: 5.2.17
getCount broken, query mysql directly?
September 28, 2012, 02:12:41 pm
the 'getCount' action seems to be broken. It seems as if it is internally running a 'get' action and counting the results instead of running the count at the db level.  By default the result of "count" is limited to 25 or less regardless of how big the resulting search. I can increase that limit with rowCount to 1085 before I exhaust my php memory limit of 64M.

Can anyone point me to any documentation on if there is a civicrm "right" way to do direct database queries?

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: getCount broken, query mysql directly?
September 28, 2012, 02:55:52 pm
I just fixed this on Contact Get http://issues.civicrm.org/jira/browse/CRM-10229 but it's in Trunk so won't be in a release until 4.3 (although it's backportable)
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • getCount broken, query mysql directly?

This forum was archived on 2017-11-26.