[Koha-patches] [PATCH] BUG-2393: ENHANCEMENT: SearchMember() uses "cardnumber%" wildcard - if other search-types fail

paul POULAIN paul.poulain at biblibre.com
Fri Jul 25 08:56:10 CEST 2008


Joshua Ferraro a écrit :
>> So, maybe we should have a 2 step check :
>> - do the search without %
>> - if no answer : count the number of results with %. If less than, say
>> 100 => return, if more => ??
>>     
> I believe that running COUNT() will take just as long as running the query
> itself, at least that's my understanding of how COUNT() works.
>   
The like "cardnumber%" is indexed, so the query will be fast. both : 
select count(*) and select *
The only problem with select * is the quantity of datas you will have to 
return to the client. That would result in a huge HTML, that could be a 
problem for both server & client.

+ in my idea, the % search is done only if no result is returned with 
the "simple" search.

Another suggestion :
what about having a simple like $cardnumber search ? This way, if the 
librarian enters a %, he will know he does it ! I'm always cold to add % 
silently...

-- 
Paul POULAIN
http://www.biblibre.com
Expert en Logiciels Libres pour l'info-doc
NOUVEAU TELEPHONE : 04 91 81 35 08




More information about the Koha-patches mailing list