in reply to getting the columns names from a mysql query

Give this a try: %storedProfile = %{$query->fetchrow_hashref}; And for a bonus tidbit of info -- fetchrow_hashref() returns lowercase column names in MySQL, but it returns uppercase column names in Oracle. Knowing is half the battle. :)

Replies are listed 'Best First'.
Re: Re: getting the columns names from a mysql query
by blakem (Monsignor) on May 02, 2002 at 07:47 UTC
    Of course DBI allows you to change the default behavior with:
    # use uppercase keynames $dbh->{FetchHashKeyName} = 'NAME_uc'; # use lowercase keynames $dbh->{FetchHashKeyName} = 'NAME_lc';

    -Blake

Re: Re: getting the columns names from a mysql query
by Anonymous Monk on May 02, 2002 at 05:11 UTC
    that uppercase oracle vs lowercase mysql thing wasted about 3days straight of mmy life last year, figuring out what the hell was going wrong when all my scripts broke on a clients db :/