[Koha-patches] [PATCH] (bug #3558) use replace instead of insert

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Thu Aug 27 09:25:18 CEST 2009


Do no watch this patch, something is wrong.

Le Wed, 26 Aug 2009 17:06:30 +0200,
Nahuel ANGELINETTI <nahuel.angelinetti at biblibre.com> a écrit :

> build browser and cloud script problem, if you run it more than one
> time, with duplicate entries. This one, replace the "insert" by
> "replace". ---
>  misc/cronjobs/build_browser_and_cloud.pl |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/misc/cronjobs/build_browser_and_cloud.pl
> b/misc/cronjobs/build_browser_and_cloud.pl index 263d886..d3304a1
> 100755 --- a/misc/cronjobs/build_browser_and_cloud.pl
> +++ b/misc/cronjobs/build_browser_and_cloud.pl
> @@ -142,7 +142,7 @@ if ($browser_tag) {
>  # fills the cloud (tags) table
>  if ($cloud_tag) {
>      $dbh->do("truncate tags");
> -    my $sth = $dbh->prepare("insert into tags (entry,weight) values
> (?,?)");
> +    my $sth = $dbh->prepare("replace into tags (entry,weight) values
> (?,?)"); foreach (keys %cloud_result) {
>          $sth->execute($_,$cloud_result{$_});
>      }


-- 
Nahuel ANGELINETTI




More information about the Koha-patches mailing list