Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [shann123] Loop help

Quote Reply
Re: [shann123] Loop help In reply to
There are some errors in your code.

Give this a go....

Code:
sub mark_unread {
my $hash = $IN->get_hash;
my @list = exists $hash->{ID} && ref $hash->{ID} eq 'ARRAY' ? @{$hash->{ID}} : $hash->{ID};

for (@list) {
my $query = qq!UPDATE $db_comments SET messageread = '0' WHERE ID = ! . $DBH->quote($_);
return $DBH->do($query) ?
&html_view_messages("User updated.") :
&html_view_messages("Error updating user. Reason: $DBI::errstr");
}
}
Subject Author Views Date
Thread; hot thread Loop help shann123 14259 Feb 25, 2005, 3:31 PM
Thread; hot thread Re: [shann123] Loop help
webmaster33 14056 Feb 26, 2005, 5:21 PM
Thread; hot thread Re: [webmaster33] Loop help
shann123 14045 Feb 26, 2005, 10:25 PM
Thread; hot thread Re: [shann123] Loop help
webmaster33 14048 Feb 27, 2005, 1:22 AM
Thread; hot thread Re: [webmaster33] Loop help
shann123 14078 Feb 27, 2005, 11:07 AM
Thread; hot thread Re: [shann123] Loop help
webmaster33 14072 Feb 27, 2005, 4:40 PM
Thread; hot thread Re: [webmaster33] Loop help
shann123 14059 Feb 28, 2005, 6:27 AM
Thread; hot thread Re: [shann123] Loop help
shann123 14056 Feb 28, 2005, 6:48 AM
Post; hot thread Re: [shann123] Loop help
webmaster33 14037 Feb 28, 2005, 8:55 AM
Thread; hot thread Re: [shann123] Loop help
Paul_Wilson 14047 Feb 28, 2005, 2:14 PM
Thread; hot thread Re: [Paul_Wilson] Loop help
shann123 14038 Feb 28, 2005, 3:29 PM
Thread; hot thread Re: [shann123] Loop help
Paul_Wilson 14020 Feb 28, 2005, 4:28 PM
Thread; hot thread Re: [Paul_Wilson] Loop help
shann123 14064 Feb 28, 2005, 4:34 PM
Thread; hot thread Re: [shann123] Loop help
Paul_Wilson 14036 Feb 28, 2005, 4:42 PM
Thread; hot thread Re: [Paul_Wilson] Loop help
shann123 14025 Feb 28, 2005, 4:48 PM
Thread; hot thread Re: [shann123] Loop help
Paul_Wilson 14007 Feb 28, 2005, 4:54 PM
Thread; hot thread Re: [Paul_Wilson] Loop help
shann123 14003 Feb 28, 2005, 5:00 PM
Thread; hot thread Re: [shann123] Loop help
Paul_Wilson 14037 Feb 28, 2005, 5:05 PM
Thread; hot thread Re: [Paul_Wilson] Loop help
shann123 13977 Feb 28, 2005, 5:13 PM
Thread; hot thread Re: [shann123] Loop help
Paul_Wilson 14007 Feb 28, 2005, 5:15 PM
Thread; hot thread Re: [Paul_Wilson] Loop help
shann123 14028 Feb 28, 2005, 5:18 PM
Post; hot thread Re: [shann123] Loop help
Paul_Wilson 13993 Feb 28, 2005, 5:20 PM
Post; hot thread Re: [Paul_Wilson] Loop help
webmaster33 13996 Feb 28, 2005, 4:51 PM