- or download this
my $sql = qq{ SELECT item1 FROM basket WHERE item LIKE 'a%'
UNION SELECT item2 FROM basket WHERE item2 LIKE 'a%'
...
UNION SELECT item4 FROM basket WHERE item4 LIKE 'a%'
ORDER BY 1
};
- or download this
while (my @ary = $sth->fetchrow_array()) {
# $ary[0] gives the value of each selected item
}
- or download this
item1 perl
item2 python
item3 ruby
item4 php