in reply to Checkboxes into an SQL Select query

I think you want to grep the checked values and then join them. Maybe use map to apply the $db->quote to them. Something like (read bottom to top):
$columns = join ',', # paste them together separ +ated by commas map { $db->quote($fd{$_}) } # extract the value and quo +te it grep { exists $fd{$_} } # keep only the checked one +s ('chk1'..'chk6') # Checkboxes ;

Caution: Contents may have been coded under pressure.

Replies are listed 'Best First'.
Re^2: Checkboxes into an SQL Select query
by Quicksilver (Scribe) on May 31, 2007 at 08:48 UTC
    Many thanks Roy, the code has pretty much achieved what I was trying to do though it replaces commas with \0 but I'm sure I can sort that out today.