Deviland
Deviland

Reputation: 3374

Filemaker PHP API date range find

I am trying to find a certain set of data from my Filemaker DB, for example

$fm = new FileMaker(****, ****, ****, ****);

$find = $fm->newFindCommand('MyLayout');

$find->addFindCriterion('Start_Date','07/01/2011');

$results = $find->execute();

This returns all of the data from my layout but does not use the find criterion.

any ideas?

Upvotes: 1

Views: 1692

Answers (1)

andyknas
andyknas

Reputation: 1957

Be sure to check for an error before you show the results.

If $notFound = true then you could display some other message.

// check for an error in result
if (FileMaker::isError($results)) {
    if ($results->code != 401) {
      echo 'unable to find data: ' . $results->message . '(' . $results->code . ')';
      die();
    }
    else $notFound = true;
}

Upvotes: 1

Related Questions