[FX.php List] Finding multiple records from multiple values for same field

Nick whatdoyouwant at gmail.com
Tue May 13 13:04:02 MDT 2008


Yes Bob, I use the -findquery syntax in a few production sites.  It works
very well, and it does the queries in order, which is interesting when you
combine finds and omits as well as 'and' and 'or' queries.

So here's how you would add it to FX.php:
If you're using the new FX-4.51 you have to add this line to array    var
$actionArray  in the file FX.php:
            '-findquery'            =>'-findquery',

You also have to add this for both of the recent versions of FX.php:
    function FMFindQuery ($returnDataSet = true, $returnData = 'full',
$useInnerArray = true)
    {
        return $this->FMAction("-findquery", $returnDataSet, $returnData,
$useInnerArray);
    }

the above i think is around line 1937, where the line for the very similar
function FMFind is.
Keep in mind that this will only work for server 9.

I could send my FX.php file to compare but I turn off some things in it that
I don't need involving the FMSkipRecords (which seems to cause an error
sometimes when I use FX.php)

Nick Salonen

On Tue, May 13, 2008 at 9:02 AM, Troy Meyers <tcmeyers at troymeyers.com>
wrote:

> Nick,
>
> What did you mean by:
>
> > FMFindQuery();  // you would have to create add the -findquery piece in
> > the FX.php file. pretty easy to add
>
> ...?
>
> -Troy
>
>
>
> > I didn't see this mentioned, but with FileMaker server 9 and FX.php you
> > can use:
> >
> AddDBParam('query', '(q1);(q2);(q3);(q4);(q5)');
> AddDBParam('-q1', 'myNum');
> AddDBParam('-q1.value', 1);
> AddDBParam('-q2', 'myNum');
> AddDBParam('-q2.value', 2);
> AddDBParam('-q3', 'myNum');
> AddDBParam('-q3.value', 3);
> AddDBParam('-q4', 'myNum');
> AddDBParam('-q4.value', 4);
> AddDBParam('-q5', 'myNum');
> AddDBParam('-q5.value', 5);
>
> FMFindQuery();  // you would have to create add the -findquery piece in
> the
> FX.php file. pretty easy to add
> >
> > -Nick
> >
> > On Fri, May 9, 2008 at 3:22 PM, Bob Patin <bob at patin.com> wrote:
> >
> > > I need to set up a query that searches a single field for any of a set
> > of > numbers (in other words, multiple find requests). > > I might have
> > 2 values, I might have 20; so I need to find > > 1 > 2 > 3 > 4 > 5 > >
> > in the "myNum" field > > and return all matched records. Would I need to
> > do a separate query for > each search value, and concatenate the
> > resulting arrays, or can i do this in > a single query? > > Thanks, > >
> > Bob Patin > Longterm Solutions > bob at longtermsolutions.com >
> > 615-333-6858 > http://www.longtermsolutions.com > FileMaker 9 Certified
> > Developer > Member of FileMaker Business Alliance and FileMaker TechNet
> > > >  CONTACT US VIA INSTANT MESSAGING: >     AIM or iChat: longterm1954
> > >     Yahoo: longterm_solutions >     MSN: tech at longtermsolutions.com >
> >   ICQ: 159333060 > > -------------------------- > Contact us for
> > FileMaker hosting and programming for all versions of > FileMaker > PHP
> >
> > CDML
> >
> > Full email services
> >
> > Free DNS hosting
> >
> > Colocation
> >
> > > Consulting > > _______________________________________________ >
> > FX.php_List mailing list > FX.php_List at mail.iviking.org >
> > http://www.iviking.org/mailman/listinfo/fx.php_list >
>
> _______________________________________________
> 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://www.iviking.org/pipermail/fx.php_list/attachments/20080513/1087c751/attachment-0001.html


More information about the FX.php_List mailing list