[FX.php List] Hitting a FM Server with a large search request

Dale Bengston dbengston at preservationstudio.com
Tue Jan 23 14:24:17 MST 2007


Hi Ed,

I'm suggesting that, transparent to the user, you concatenate all 15  
of those fields into a 16th. Then you give them one search input that  
looks for whatever they enter in that 16th field, which contains the  
other 15.

Dale


On Jan 23, 2007, at 3:06 PM, Edward L. Ford wrote:

> Dale,
> Could you explain your options a little better?  I don't quite follow.
>
> Let me re explain my question as well in case it wasn't clear:
> My end goal is to provide a simple search capabilities for database  
> records.  So, if a user enters a search term into the search field,  
> I want to return any record that contain the search term.  This  
> search term can exist in any of 15 possible fields (an OR search).
>
> I really want to know if there's a better way to do this than:
> $Query->AddDBParam('Field1', 'SearchTerm');
> $Query->AddDBParam('Field2', 'SearchTerm');
> ...
> $Query->AddDBParam('Field15', 'SearchTerm');
> $Query->AddDBParam('-lop', 'or');
> $Results = $Query->FMFind();
>
> Or, is that indeed the best way?
>
> Cheers,
> --Ed
>
> ---------------------
> http://www.edwardford.net
>
>
> On Jan 23, 2007, at 1:55 PM, Dale Bengston wrote:
>
>> Hi Ed,
>>
>> The cheap-and-cheesy way is to concatenate all 15 fields into a  
>> text field (returns between field contents) and run your search  
>> against that.
>>
>> There are a few ways to execute this. I thought of three; they are  
>> listed in order of most attractive to least attractive (in my  
>> opinion):
>>
>> 1. Have FX.php pass data to the discrete fields and do the concat  
>> for the big blob when you modify a record.
>> 2. Run an FMP script every time a record is modified and  
>> concatenate the other fields to the big blob.
>> 3. Make the big blob field be an FMP calculation field.
>>
>> Personally, I try to avoid using FMP where I can accomplish the  
>> same thing with PHP. That's why I favor option 1.
>>
>> Hope this helps,
>> Dale
>>
>> On Jan 21, 2007, at 11:57 PM, Edward L. Ford wrote:
>>
>>> Hi everyone,
>>> Currently, I have a search page with 15 different fields a user  
>>> can fill out.  I feel like this is a lot just by the sheer number  
>>> of options presented to first time users.  I'd like to have a one  
>>> field search box only -- users love simple interfaces -- and this  
>>> search searches all fields.
>>>
>>> My only concern is the load on the FM server by requesting it  
>>> search for a string in 15 fields (and possibly more than that in  
>>> the future).  Does anyone have any experience with this issue?   
>>> I'd love to hear from your experience.  Also, if anyone has any  
>>> thoughts on reducing the load, or building in some sort of "smart  
>>> search" capabilities to help the PHP application, I'd be  
>>> interested in your thoughts.
>>>
>>> Cheers,
>>> --Ed
>>>
>>> ---------------------
>>> http://www.edwardford.net
>>>
>>>
>>> _______________________________________________
>>> 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
>
> _______________________________________________
> 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/20070123/c1481a71/attachment.html


More information about the FX.php_List mailing list