You need to sign in to do that
Don't have an account?

PHP and QueryMore
I'm trying to get a record set of more than 2000 records and I know that I'm supposed to use the queryMore function to do that.
I read through many posts and I'm having a hard time knowing exactly how to do this in PHP.
Here is what I have and maybe someone can enlighten me as to what I have wrong. I'm pretty sure it has to do with the locator variable because that is coming up NULL when I echo it.
------------------------------------------------------
$query = "...my query which I know is working...";
$response = $connection->query($query);
while ($response->done == false)
{
$locator = $connection->queryLocator;
$response = $connection->queryMore($locator, 2000);
}
return $response->records;
--------------------------------------------------------
Thanks
I read through many posts and I'm having a hard time knowing exactly how to do this in PHP.
Here is what I have and maybe someone can enlighten me as to what I have wrong. I'm pretty sure it has to do with the locator variable because that is coming up NULL when I echo it.
------------------------------------------------------
$query = "...my query which I know is working...";
$response = $connection->query($query);
while ($response->done == false)
{
$locator = $connection->queryLocator;
$response = $connection->queryMore($locator, 2000);
}
return $response->records;
--------------------------------------------------------
Thanks
How are people handling using queryMore and tacking the results on to the current array. Is there a best method?
$result=$connection->query(array('queryString'=>$query));
while($result->result->done == '') {
$locator=$result->result->queryLocator;
$result=$sforce->queryMore(array('queryLocator'=>$locator));
}
The $result object has a result object inside of it, and the query and queryMore functions want arrays as arguments, contrary to the documentation that says they take string arguments.
but still I cant use "QueryMore" !!
I am getting an error that says that i am trying to use query(($SQL)); function with an array instead of a string.
Can any one help?
Also check out the samples here: http://wiki.apexdevnet.com/index.php/PHP_Toolkit_11.0_Samples