# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
use strict;
use warnings;
# called by default form, used to confirm deletion of data in DB
} elsif ($op eq 'delete_confirm') {
$template->param(delete_confirm => 1);
- my $sth=$dbh->prepare("select count(*) as total from borrowers,cities where borrowers.city=cities.city_name and cityid=?");
- # FIXME: this check used to pretend there was a FK "select_city" in borrowers.
+ my $sth=$dbh->prepare("select cityid,city_name,city_zipcode from cities where cityid=?");
$sth->execute($cityid);
- my $total = $sth->fetchrow_hashref;
- my $sth2=$dbh->prepare("select cityid,city_name,city_zipcode from cities where cityid=?");
- $sth2->execute($cityid);
- my $data=$sth2->fetchrow_hashref;
+ my $data=$sth->fetchrow_hashref;
$template->param(
- total => $total->{'total'},
city_name => $data->{'city_name'},
city_zipcode => $data->{'city_zipcode'},
);