Bug 3775: Accounts::chargelostitem uses title, but title not available to it
This patch fixes the SELECT so that title is available when it is used later on, which will prevent 'Use of uninitialized value' errors. It also uses JOIN properly, which the original query and my initial patches for this did not. Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
parent
64b79bf620
commit
bc06a7736a
1 changed files with 5 additions and 1 deletions
|
@ -283,7 +283,11 @@ sub chargelostitem{
|
|||
|
||||
my $dbh = C4::Context->dbh();
|
||||
my ($itemnumber) = @_;
|
||||
my $sth=$dbh->prepare("SELECT * FROM issues, items WHERE issues.itemnumber=items.itemnumber and issues.itemnumber=?");
|
||||
my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title
|
||||
FROM issues
|
||||
JOIN items USING (itemnumber)
|
||||
JOIN biblio USING (biblionumber)
|
||||
WHERE issues.itemnumber=?");
|
||||
$sth->execute($itemnumber);
|
||||
my $issues=$sth->fetchrow_hashref();
|
||||
|
||||
|
|
Loading…
Reference in a new issue