How many results were returned?

Posted by Pastor Bones on Stack Overflow See other posts from Stack Overflow or by Pastor Bones
Published on 2012-10-03T02:41:38Z Indexed on 2012/10/03 3:37 UTC
Read the original article Hit count: 92

Filed under:
|
|

I'm performing a query on a worksheet. I want to update the row if it exists or insert it if it doesn't. How can you check if a result was returned or not?

$query = new Zend_Gdata_Spreadsheets_ListQuery();
$query->setSpreadsheetKey($this->currKey);
$query->setWorksheetId($this->currWkshtId);
$query->setSpreadsheetQuery('cid = ' . $data['cid']);
$listFeed = $this->gdClient->getListFeed($query);

// This does not work!
if(empty($listFeed)){
 echo 'No results found!';
}

© Stack Overflow or respective owner

Related posts about php

Related posts about zend-framework