Hi, Noted. Also, I wouldn't push it anyway, since adding a REPLACE statement would be a regression of bug 1546 [1]. Instead, avoid the MySQLism and do a SELECT/UPDATE/INSERT combination.
[1] http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=1546 Regards, Galen On Thu, Aug 27, 2009 at 3:25 AM, Nahuel ANGELINETTI<[email protected]> wrote: > > Do no watch this patch, something is wrong. > > Le Wed, 26 Aug 2009 17:06:30 +0200, > Nahuel ANGELINETTI <[email protected]> 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 > > _______________________________________________ > Koha-patches mailing list > [email protected] > http://lists.koha.org/mailman/listinfo/koha-patches -- Galen Charlton [email protected] _______________________________________________ Koha-patches mailing list [email protected] http://lists.koha.org/mailman/listinfo/koha-patches
