I have a tablo as shown below.
I can print 40 when using this sql query:
SELECT SUM (People) FROM "Booking" WHERE TourDate = 3/01/2017
I want to get sum of the column "People" using FM PHP Api. So far I have written this:
include("filemaker.php"); $date = "3/01/2017"; $fm = new FileMaker('filename', 'hostname', 'admin','passw0rd'); $findCommand = $fm->newFindCommand("Bookings"); $findCommand->addFindCriterion("TourDate", $date); $result = $findCommand->execute(); $records = $result->getRecords();
First time I am using FM PHP Api. I don't know how to proceed from here. I would appreciate any suggestion. Thanks.