|
Lines 1839-1848
this function deletes subscription which has $subscriptionid as id.
Link Here
|
| 1839 |
sub DelSubscription { |
1839 |
sub DelSubscription { |
| 1840 |
my ($subscriptionid) = @_; |
1840 |
my ($subscriptionid) = @_; |
| 1841 |
my $dbh = C4::Context->dbh; |
1841 |
my $dbh = C4::Context->dbh; |
| 1842 |
$subscriptionid = $dbh->quote($subscriptionid); |
1842 |
$dbh->do("DELETE FROM subscription WHERE subscriptionid=?", undef, $subscriptionid); |
| 1843 |
$dbh->do("DELETE FROM subscription WHERE subscriptionid=$subscriptionid"); |
1843 |
$dbh->do("DELETE FROM subscriptionhistory WHERE subscriptionid=?", undef, $subscriptionid); |
| 1844 |
$dbh->do("DELETE FROM subscriptionhistory WHERE subscriptionid=$subscriptionid"); |
1844 |
$dbh->do("DELETE FROM serial WHERE subscriptionid=?", undef, $subscriptionid); |
| 1845 |
$dbh->do("DELETE FROM serial WHERE subscriptionid=$subscriptionid"); |
|
|
| 1846 |
|
1845 |
|
| 1847 |
my $afs = Koha::AdditionalField->all({tablename => 'subscription'}); |
1846 |
my $afs = Koha::AdditionalField->all({tablename => 'subscription'}); |
| 1848 |
foreach my $af (@$afs) { |
1847 |
foreach my $af (@$afs) { |
| 1849 |
- |
|
|