in reply to Perl-MySQL get column names

Your SQL looks a bit odd. If you mean something like (SELECT item1, item2, item3 FROM basket) then:

$hashref = $sth->fetchrow_hashref;

does what you want with key field name and value......

cheers

tachyon

Replies are listed 'Best First'.
Re^2: Perl-MySQL get column names
by kiat (Vicar) on Nov 07, 2004 at 12:23 UTC
    Thanks, tachyon!

    I've modified my sql. I missed out the LIKE clause.