[FX.php List] How do we perform the equivalent of multiple find requests?

Malcolm Fitzgerald malcolm at notyourhomework.net
Thu May 3 02:19:47 MDT 2012


Hi Steve,

There's no reason not to use the API for this, so thanks for the pointer. 

The application is a booking calendar and the problem is to find a date range within a set of date ranges. The trick is that the dates we are searching for are not actual data, it is inferred date. We have a start date and an end date, eg, start: 24th April, end: 7th May. All the dates in between are inferred. 

To display a booking calendar I have to do three searches to find all the data.

1. starts within date range 
2. ends within date range 
3. spans date range

I'm beginning to think I should generate the data within the database so that the we have a related set of dates. We could then do a single search "date is within range".

Malcolm


On 03/05/2012, at 5:23 PM, Steve Winter wrote:

> Hi Malcolm
> 
> You can do that with the API (see http://www.mindfiresolutions.com/Compound-Find-Command-in-FileMaker-API-763.php for an example) but I don't believe that it's possible with FX.
> 
> I expect that you're going to have to perform two finds, then merge the result sets with PHP…
> 
> Cheers
> Steve
> 
>> I want to combine two searches, both of which have multiple criteria. In filemaker itself it would be easy, two find requests. 
>> 
>> I want to find all records where  "id = a AND date_1=a ... b" OR "id=a AND date_2=a...b". 
>> 
>> Is the solution to do two separate searches and combine the results or is there a better way?
>> 
>> Malcolm_______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
> 
> Steve Winter
> +44 777 852 4776
> steve at bluecrocodile.co.nz
> 
> 
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20120503/c524f349/attachment.html


More information about the FX.php_List mailing list