Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [shann123] Loop help

Quote Reply
Re: [shann123] Loop help In reply to
Can you find the code that parses the form to see how %in is populated for parameters with more than one value - that might shed some light on the situation. I don't have access to the files myself.

By the way, to improve the performance of the code it may be better to use the following query, which only needs to be run once, rather than executing multiple updates....

UPDATE $db_comments SET messageread = '0' WHERE ID IN(1,2,3,4,5)

To do that you'd use:
Code:
my $query = qq|UPDATE $db_comments SET messageread = '0' WHERE ID IN(| . join(', ', map $DBH->quote($_), @list) . q|)|;
Subject Author Views Date
Thread; hot thread Loop help shann123 11310 Feb 25, 2005, 3:31 PM
Thread; hot thread Re: [shann123] Loop help
webmaster33 11137 Feb 26, 2005, 5:21 PM
Thread; hot thread Re: [webmaster33] Loop help
shann123 11125 Feb 26, 2005, 10:25 PM
Thread; hot thread Re: [shann123] Loop help
webmaster33 11125 Feb 27, 2005, 1:22 AM
Thread; hot thread Re: [webmaster33] Loop help
shann123 11159 Feb 27, 2005, 11:07 AM
Thread; hot thread Re: [shann123] Loop help
webmaster33 11147 Feb 27, 2005, 4:40 PM
Thread; hot thread Re: [webmaster33] Loop help
shann123 11139 Feb 28, 2005, 6:27 AM
Thread; hot thread Re: [shann123] Loop help
shann123 11136 Feb 28, 2005, 6:48 AM
Post; hot thread Re: [shann123] Loop help
webmaster33 11117 Feb 28, 2005, 8:55 AM
Thread; hot thread Re: [shann123] Loop help
Paul_Wilson 11127 Feb 28, 2005, 2:14 PM
Thread; hot thread Re: [Paul_Wilson] Loop help
shann123 11118 Feb 28, 2005, 3:29 PM
Thread; hot thread Re: [shann123] Loop help
Paul_Wilson 11100 Feb 28, 2005, 4:28 PM
Thread; hot thread Re: [Paul_Wilson] Loop help
shann123 11145 Feb 28, 2005, 4:34 PM
Thread; hot thread Re: [shann123] Loop help
Paul_Wilson 11116 Feb 28, 2005, 4:42 PM
Thread; hot thread Re: [Paul_Wilson] Loop help
shann123 11106 Feb 28, 2005, 4:48 PM
Thread; hot thread Re: [shann123] Loop help
Paul_Wilson 11087 Feb 28, 2005, 4:54 PM
Thread; hot thread Re: [Paul_Wilson] Loop help
shann123 11084 Feb 28, 2005, 5:00 PM
Thread; hot thread Re: [shann123] Loop help
Paul_Wilson 11118 Feb 28, 2005, 5:05 PM
Thread; hot thread Re: [Paul_Wilson] Loop help
shann123 11058 Feb 28, 2005, 5:13 PM
Thread; hot thread Re: [shann123] Loop help
Paul_Wilson 11088 Feb 28, 2005, 5:15 PM
Thread; hot thread Re: [Paul_Wilson] Loop help
shann123 11102 Feb 28, 2005, 5:18 PM
Post; hot thread Re: [shann123] Loop help
Paul_Wilson 11074 Feb 28, 2005, 5:20 PM
Post; hot thread Re: [Paul_Wilson] Loop help
webmaster33 11078 Feb 28, 2005, 4:51 PM