2 years ago
#43067
Bob Ramsey
filemaker api and fmRESTRor find with OR condition
Coming from an sql background and trying to learn FileMaker using fmRESTor in php to communicate with the api. If I had the following table called 'animals' in an sql databae:
field1 | field2 | field3
------------------------------
dog | mammal | woof
cat | mammal | meow
canary | bird | tweet
I would do select * from animals where field1 like '%og%' or field3 = 'tweet'
and get back 2 rows
field1 | field2 | field3
------------------------------
dog | mammal | woof
canary | bird | tweet
So how would I do that in fmRESTor or the FM api? It looks like findRecords() is using like for each individual field and then AND to combine them. I can set just "field1": "og" and it finds dog, but "field1: "og", "field3": "tweet" returns no records.
Any ideas? Or do I just have to do two finds, combine the results, and eliminate duplicates?
thanks!
php
filemaker
0 Answers
Your Answer