[Koha-devel] koha top query
Paul POULAIN
paul.poulain at free.fr
Wed Mar 7 17:46:12 CET 2007
long_sam.tw a écrit :
> Koha Top query
Hi long_sam,
>
> summary:
> User query something via hiddin modthod.
> Keywords will recorded in databases.It will help user when he/
> she query catalog.
>
> enviroments:
> koha 2.2.5 & koha 2.2.7 (templete for npl)
>
> modfied files:
> perl scripts - opac-search.pl、opac-main.pl
> tmpl - opac-main.tmpl
> database - create Cookie table
Nice feature, but I won't add it in official trunk for at least 2 reasons :
- it does not use our coding guidelines that says "no SQL query in a .pl
script, only in a .pm package". Thus, you should have done a
C4/Queries.pm package.
- it seems strange to me : you have a counts row in cookie table (I
would have choosen another name for this table, but that's a little
note), but only store 1 in the row. The best solution, would be to
increment the counter row (update ... set counts=counts+1), while you
create one every time. You'll get a huge query in the long term...
however, I keep the feature in my mind, maybe i'll add it in 3.0 in the
future (no promise ;-) )
--
Paul POULAIN et Henri Damien LAURENT
Consultants indépendants
en logiciels libres et bibliothéconomie (http://www.koha-fr.org)
Tel : 04 91 31 45 19
More information about the Koha-devel
mailing list