[FX.php List] Finding records based on an array of IDs

Bob Patin bob at patin.com
Mon Aug 13 08:45:47 MDT 2012


I have a system where there are users in a USERS table; each USER has 1 or more related records in a 2nd table that we'll call TOURS.

In a 3rd table I have related documents that are uploaded to one of the tours for which this user *may* have access.

For example, let's say that I am a user, and I have 2 tours that I can access.

USER: bob

TOUR IDs: 100, 101

When I login, I create an array of all the tourIDs related to my user record; I store the array in a session variable

$_SESSION['tourIDs'][0] = 100
$_SESSION['tourIDs'][1] = 101

I want to find a list of all documents that have one of these tourIDs in it.

QUESTION: How do I append my found set to include multiple tourIDs? The first idea I had was to create an array from the found records, and build my results that way; is there an easier way than that to extend a found set similar to the way that FileMaker does it?

Thanks,


Bob Patin
Longterm Solutions LLC
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
FileMaker 9, 10 & 11 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--
Twitter: bobpatin
Google+: http://www.longtermsolutions.com/plus
AIM: longterm1954
iChat: bobpatin
--
Expert FileMaker Consulting 
FileMaker Hosting for all versions of FileMaker



More information about the FX.php_List mailing list