+ Reply to Thread
Results 1 to 2 of 2
This is a discussion on Getting COUNT() values from PHPToolKit within the Salesforce PHP Tutorials forums, part of the Salesforce category; All, I'm just getting into SF/PHP integration, and I'm having an impossible
  1. #1
    dustin is offline Junior Member
    Join Date
    Feb 2011
    Posts
    1

    Getting COUNT() values from PHPToolKit

    All, I'm just getting into SF/PHP integration, and I'm having an impossible time figuring out how to pull COUNT() values out of queries using the PHPToolKit results ... I don't even see the values if i print_r.

    I saw one post online that said this functionality is not supported in toolkit 20.0 -- if true, that sucks! Any thoughts on workarounds or ways to get those counts? I just want to avoid unnecessary queries.

    Thanks!

    Dustin

  2. #2
    Adam Best is offline Junior Member
    Join Date
    Apr 2011
    Posts
    10

    Post

    Hi Dustin,

    I've not seen a PHP Toolkit 20.0. Developerforce wiki only has PHP Toolkit 13.1 at the time of this posting.

    Right now, here is the official way to query your objects:
    PHP Toolkit 13.0 QueryOptions Sample (Partner) - developer.force.com

    In my experience, depending on the object, you can only query around 500 - 2k records per API request.
    So if you had a table with 4k records and you wanted to get a count of all records, you would really need between 2-8 API calls depending on your Object. We run 1k records safely.

    Here are the help pages:
    query - Executes a query against the specified object and returns data that matches the specified criteria. sample
    queryMore - Retrieves the next batch of objects from a query. sample
    queryOptions - Specifies the batch size for queries. sample

    Regards,
    Adam
    Into Joomla! and SalesForce?
    Check us out below at
    miiWorks - Joomla Extensions, SalesForce Apps, Business Apps, Web Hosting, Domains
    Last edited by Adam Best; 04-20-2011 at 12:09 PM.

+ Reply to Thread

Similar Threads

  1. Getting nested field values
    By vdanvoye in forum Salesforce Coding Discussions
    Replies: 2
    Last Post: 06-01-2009, 08:16 AM
  2. Null values inserting into database
    By msweet in forum Salesforce PHP Tutorials
    Replies: 23
    Last Post: 04-20-2009, 11:01 AM
  3. IIS/PHPToolkit???
    By zishan876 in forum Salesforce Coding Discussions
    Replies: 5
    Last Post: 04-16-2008, 03:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO 3.5.2