From 86156c11168223a5edf667b897d52b5a2c58462d Mon Sep 17 00:00:00 2001 From: tonnesen Date: Tue, 25 Jun 2002 16:57:39 +0000 Subject: [PATCH] Fixed bug. $sth->execute after $sti->prepare. --- updater/updatedatabase | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/updater/updatedatabase b/updater/updatedatabase index c8183ea522..a448be237b 100755 --- a/updater/updatedatabase +++ b/updater/updatedatabase @@ -231,9 +231,9 @@ while (my ($column, $type, $null, $key, $default, $extra) = $sth->fetchrow) { unless ($branchcategories{'categorycode'} eq 'varchar(4)') { print "Setting type of categorycode in branchcategories to varchar(4),\n and making the primary key.\n"; my $sti=$dbh->prepare("alter table branchcategories change categorycode categorycode varchar(4) not null"); - $sth->execute; - $sth=$dbh->prepare("alter table branchcategories add primary key (categorycode)"); - $sth->execute; + $sti->execute; + $sti=$dbh->prepare("alter table branchcategories add primary key (categorycode)"); + $sti->execute; } unless ($branchcategories{'branchcode'} eq 'varchar(4)') { @@ -271,6 +271,9 @@ $dbh->disconnect; exit; # $Log$ +# Revision 1.4.2.9 2002/06/25 16:57:39 tonnesen +# Fixed bug. $sth->execute after $sti->prepare. +# # Revision 1.4.2.8 2002/06/25 16:56:29 tonnesen # Populate systempreferences table with values for acquisitions and # autoMemberNum. I have picked acquisitions='simple' and autoMemberNum='1' as -- 2.39.5