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 (Moderator: Donald Lobo) »
  • Change export.php or drush civicrm-api default count from 25
Pages: [1]

Author Topic: Change export.php or drush civicrm-api default count from 25  (Read 902 times)

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Change export.php or drush civicrm-api default count from 25
March 10, 2013, 07:14:03 pm
I'm trying to use either export.php or drush civicrm-api and can't seem to change the default 25 count via command line. 
"drush civicrm-api contact.get count=4" will ignore count
 and so will:
php export.php -a GET -e Contact --count=4

Has anyone worked with the drush or php export/import tools much?  I also am having issues working with Event entities.  I'd be happy to help document if someone could give me some more info.  thx.


sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
ANSWERED: Change export.php or drush civicrm-api default count from 25
March 10, 2013, 11:13:22 pm
Found it here: http://forum.civicrm.org/index.php?topic=24282.0

use option_limit.  It was  confusing since count=25 is in the param array ...

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Change export.php or drush civicrm-api default count from 25
March 11, 2013, 01:14:25 am
you could also have found it here http://book.civicrm.org/developer/current/techniques/api/ :-)
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: Change export.php or drush civicrm-api default count from 25
March 11, 2013, 09:31:03 am
Yes, thanks.  There are several places where the API is documented (wiki, blogs, etc.) but this is the best.

What stumped me was that I was convinced the "Count" variable in the array gave me a count (I think it did in an older API.)  not sure what it is for but option_limit did the trick!

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Change export.php or drush civicrm-api default count from 25
March 11, 2013, 11:19:38 am
I think count did the job in API v2  ::)
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Change export.php or drush civicrm-api default count from 25
March 11, 2013, 01:48:38 pm
every function had a different syntax in api v2 so I'm sure it would have worked somewhere.

karma+ to Erik for the booki documentation
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

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: Change export.php or drush civicrm-api default count from 25
May 30, 2014, 12:20:16 pm
FYI - looks like it is now rowCount= .... others didn't work.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Change export.php or drush civicrm-api default count from 25
May 30, 2014, 02:48:52 pm
I think from 4.4.?

$options['limit'] = 0

should always work
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 (Moderator: Donald Lobo) »
  • Change export.php or drush civicrm-api default count from 25

This forum was archived on 2017-11-26.