[FX.php List] Search question
Bob Patin
bob at patin.com
Mon Oct 30 21:01:07 MST 2006
Andy,
OK, here's a question: this particular query also has a date range
paramater as well; now that I added the OR operator, it's finding all
records, rather than just what's within my date range.
So is there a way to have the following:
$query-> AddDBParam('d_entry','10/29/2006...10/30/2006');
$query ->AddDBParam('-lop', 'or');
$query -> AddDBParam('domain_name','domain1.com');
$query -> AddDBParam('domain_name','domain2.com');
$query -> AddDBParam('domain_name','domain3.com');
and have only the records for those 3 domains, within the 2-day date
range as specified above? My guess is that the OR operator basically
says, "if any of these are true then return the record." Does the
placement of the operator line make any difference? My testing seems
to indicate that it doesn't...
Thanks,
Bob
On Oct 30, 2006, at 9:33 PM, Andy Gaunt wrote:
> Bob,
>
> You need to change the logical operator from the standard 'AND' to
> an 'OR'
>
> Use this line in your query
>
> $query ->AddDBParam('-lop', 'or');
>
> And then just add your three (or more) searches
>
> $query -> AddDBParam('domain_name','domain1.com');
> $query -> AddDBParam('domain_name','domain2.com');
> $query -> AddDBParam('domain_name','domain3.com');
>
> HTH
>
> Andy Gaunt
> Office: 321.206.3658
> Mobile: 407.810.4722
> andy at fmpug.com
> http://www.fmpug.com
>
> 2006 FileMaker Excellence Award Winner
> Recipient of FileMaker's 2005 "Mad Dog" Public Relations Award
>
> For chapter locations, dates & times please visit the website at
> http://www.fmpug.com If you can make it to a meeting, please RSVP at
> http://www.fmpug.com/rsvp.php
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Bob Patin
> Sent: Monday, October 30, 2006 9:32 PM
> To: FX.php Discussion List
> Subject: [FX.php List] Search question
>
> Hi,
>
> I've got a search that I'm working up where one of the search
> paramaters is one or more domain names.
>
> If I want to find every record where the domain_name field might
> equal domain1.com, domain2.com, or so on, how do I structure the
> query? I realized that this multiple requests is something I hadn't
> done yet...
>
> Let's assume that my search field is domain_name, and the domains I'm
> searching for are
>
> domain1.com
> domain2.com
> domain3.com
>
> I tried adding a 2nd AddDBParam('domain_name','domain2.com'), but of
> course that didn't work...
>
> Thanks,
>
> Bob Patin
> Longterm Solutions
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
>
> CONTACT US VIA INSTANT MESSAGING:
> AIM or iChat: longterm1954
> Yahoo: longterm_solutions
> MSN: tech at longtermsolutions.com
> ICQ: 159333060
>
>
> _______________________________________________
> 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
More information about the FX.php_List
mailing list