Yes, because you pass the input parameters together instead one by one.
I did not notice that in your previous post.
Try something like this:
# --------------------------------------------------------
foreach my $id (@{$IN->{'ID'}}) {
my $ID_q = $DBH->quote($id);
$query = qq!
UPDATE $db_comments SET messageread = '0'
WHERE ID = $ID_q
!;
$rc = $DBH->do($query);
$rc ?
($message_q = "User: $in{'username'} updated.") :
($message_q = "Error updating user: $in{'username'}. Reason: $DBI::errstr");
if ($rc) {
&html_view_messages($message);
} else {
&html_view_messages($message);
}
}
}
Also note, I don't know if you should use $in or $IN.
Try other if one doesn't work.
I did not check the rest of code, so still not guaranteed 100%.
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
I did not notice that in your previous post.
Try something like this:
Code:
sub mark_unread { # --------------------------------------------------------
foreach my $id (@{$IN->{'ID'}}) {
my $ID_q = $DBH->quote($id);
$query = qq!
UPDATE $db_comments SET messageread = '0'
WHERE ID = $ID_q
!;
$rc = $DBH->do($query);
$rc ?
($message_q = "User: $in{'username'} updated.") :
($message_q = "Error updating user: $in{'username'}. Reason: $DBI::errstr");
if ($rc) {
&html_view_messages($message);
} else {
&html_view_messages($message);
}
}
}
Also note, I don't know if you should use $in or $IN.
Try other if one doesn't work.
I did not check the rest of code, so still not guaranteed 100%.
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...