Reputation: 3106
I am newbie with filemaker. I am trying to set search function but something wrong and it returns No records match the request
even if it is present there. Here is code
public function get_row($table, $search='')
{
$layout_object = $this->fm->getLayout($table);
if (FileMaker::isError($layout_object)) {
return array();
}
$request = $this->fm->newFindCommand($table);
if ($search)
{
$request->addFindCriterion($search['key'], '[email protected]'); // hardcoded.
}
$result = $request->execute();
if (FileMaker::isError($result)) {
echo $result->getErrorString();
}
//.....Result: No records match the request
}
what I am doing wrong?
Upvotes: 0
Views: 530
Reputation: 2962
You need to escape the @ symbol as it's a special character in Find mode to match any one character, so try this:
$request->addFindCriterion($search['key'], 'hh\@kkk.nn'); // hardcoded.
Upvotes: 1