From 4916d89c8b2e4436a9d017616a98382085316b19 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Mon, 13 Nov 2006 00:36:55 +0000 Subject: Fixing a few db connection bugs git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@539 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/CT.pm | 10 +++++----- LedgerSMB/IS.pm | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'LedgerSMB') diff --git a/LedgerSMB/CT.pm b/LedgerSMB/CT.pm index c3dcdf29..be768503 100755 --- a/LedgerSMB/CT.pm +++ b/LedgerSMB/CT.pm @@ -205,7 +205,7 @@ sub save_customer { my ($self, $myconfig, $form) = @_; # connect to database - my $dbh = $form->dbconnect_noauto($myconfig); + my $dbh = $form->{dbh}; my $query; my $sth; my $null; @@ -575,7 +575,7 @@ sub search { my ($self, $myconfig, $form) = @_; # connect to database - my $dbh = $form->dbconnect($myconfig); + my $dbh = $form->{dbh}; my $where = "1 = 1"; $form->{sort} = ($form->{sort}) ? $form->{sort} : "name"; @@ -867,7 +867,7 @@ sub get_history { my ($self, $myconfig, $form) = @_; # connect to database - my $dbh = $form->dbconnect($myconfig); + my $dbh = $form->{dbh}; my $query; my $where = "1 = 1"; @@ -1114,7 +1114,7 @@ sub save_pricelist { my ($self, $myconfig, $form) = @_; - my $dbh = $form->dbconnect_noauto($myconfig); + my $dbh = $form->{dbh}; my $query = qq| DELETE FROM parts$form->{db} @@ -1187,7 +1187,7 @@ sub retrieve_item { my ($self, $myconfig, $form) = @_; # connect to database - my $dbh = $form->dbconnect($myconfig); + my $dbh = $form->{dbh}; my $i = $form->{rowcount}; my $var; diff --git a/LedgerSMB/IS.pm b/LedgerSMB/IS.pm index dd293759..39bcfe7c 100755 --- a/LedgerSMB/IS.pm +++ b/LedgerSMB/IS.pm @@ -1862,8 +1862,7 @@ sub retrieve_invoice { sub retrieve_item { my ($self, $myconfig, $form) = @_; - # connect to database - my $dbh = $form->dbconnect($myconfig); + my $dbh = $form->{dbh}; my $i = $form->{rowcount}; my $null; -- cgit v1.2.3