stonecolddevin has asked for the wisdom of the Perl Monks concerning the following question:
hey all,
i'm trying to push the IDs of some records deleted in my MySQL database into an array and have it return something like, "records (numbers of each record deleted here) deleted".
any ideas as to how i could do this?
sub delete_forum { my $self = shift; my $q = $self->query; $self->dbh->do( q{ DELETE FROM mx_forums WHERE id=? }, {}, $_) for $q->param('forum'); # icky, i suppose, but it's just a hunch my @deleted; push @deleted, $_ for $q->param('forum'); return $frm->build_page( { title => "MX::FORUMS::ADD" , output => +"Forum " . join ',', @deleted . " deleted." } ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: manipulating data array into returning nice message
by GrandFather (Saint) on Feb 21, 2006 at 01:20 UTC | |
by stonecolddevin (Parson) on Feb 21, 2006 at 02:50 UTC | |
|
Re: manipulating data array into returning nice message
by rhesa (Vicar) on Feb 21, 2006 at 01:17 UTC |