This release fixes a few minor errors in the previous release and introduces two new commands that we made available in the latest release of the Camelot SharePoint Integration Toolkit available at http://camelottoolkit.codeplex.com/. We always keep the documentation up to date, checkout http://docs.bendsoft.com/camelot-php-tools/latest/ for the latest version of the PHP Tools documentation.
The goodies in this update
- ExecuteCount
- ExecuteCamelotXmlLimit
View the changelog for complete details.
Counts
The counting method is reached through the SharePointQuery class by replacing the SQL argument name with count
$SharePointQuery = new SharePointQuery(array(
'count' => "SELECT ID FROM Tasks Where ID > 10",
'connection_name' => 'SharePointConnection1'
));
$recordCount = $SharePointQuery->CamelotSoap->_count;
Limits, or skip and take
The SharePoint API does not support offset in limit commands so we had to implement this in a separate method. This query looks like an ordinary SharePointQuery but we added skip and take parameters.
$SharePointQuery = new SharePointQuery(array(
'sql' => "SELECT * FROM Tasks Where ID > 10",
'connection_name' => "SharePointConnection1",
'skip' => 7,
'take' => 10
));
The above command would select stuff from the Tasks list and skip the first 7 result rows returning row 8 to 17.
A good way to use this is to first run a count to verify the amount of records available and then run the skip/take query
// Query arguments
$query = "SELECT * FROM Tasks Where ID > 10";
$connection = "SharePointConnection1";
$skip = 5;
$take = 4;
// Get the total amount of records
$CountQuery = new SharePointQuery(array(
'count' => $query,
'connection_name' => $connection
));
$recordCount = $CountQuery->CamelotSoap->_count;
// Cannot perform query, to many skips
if($skip > $recordCount){
die("You cannot skip more records than available");
}
// The results are returned to the $SharePointQuery variable
$SharePointQuery = new SharePointQuery(array(
'sql' => $query,
'connection_name' => $connection,
'skip' => $skip,
'take' => $take
));
// Print the result
pr($SharePointQuery); // or print_r($SharePointQuery);
Let us know if you have any questions; also consider using the forums http://forum.bendsoft.com

Sorry for the noob question but where, exctaly, should I add this code? Which css should be modified?I’ve never modified a CSS before, so any links you could provide would be much appreciated.Thanks for the great write up on this problem.
PHP Tools is a framework for working with a WCF-service that can communicate with SharePoint. There is a video describing the how to use it here, http://www.bendsoft.com/downloads/sharepoint-php-tools/videos/