is there a way to county how many events are returned from the query in php?


I want to *not* display the table if there are 0 rows - is this possible?

<?
function outputCalendarByFullTextQuery($client,$startDate, $endDate, 
$search)
{
$srch = stripslashes($search);
$date = $_GET['date'];
date_default_timezone_set('Europe/London');

$timenow = date('Y-m-d H:i', strtotime("now"));
$tomorrow = date('Y-m-d H:i:s', strtotime("+1 week"));


  $gdataCal = new Zend_Gdata_Calendar($client);
  $query = $gdataCal->newEventQuery();
  $query->setUser('[email protected]');
  $query->setVisibility('private-abc');
  $query->setProjection('full');
  $query->setOrderby('starttime');
  $query->setSortOrder('a');
  $query->setMaxResults('5');
  $query->setStartMin($timenow);
  $query->setStartMax($tomorrow);
  $query->setQuery($srch);
  $eventFeed = $gdataCal->getCalendarEventFeed($query);
  echo "<h1>Today</h1>
  <table>
  <tr>
  <td><b>Time</b></td>
  <td><b>Name<b></td>
  <td><b>Channel</b></td>
  </tr>";
  foreach ($eventFeed as $event) {
  
$showtitle = "$event->title";
$eventid = "$event->id";
$contents = "$event->content";


    foreach ($event->when as $when) {
    
// stuff
}
}
echo outputCalendarByFullTextQuery($client,$startDate,$endDate, $search);

?>

-- 
You received this message because you are subscribed to the Google
Groups "Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://code.google.com/apis/calendar/community/forum.html

Reply via email to