in reply to hashref problem

selectrow_array returns a list, not a statement handle object. Per the docs,
This utility method combines "prepare", "execute" and "fetchrow_array" into a single call.
So your $select just contains the first record in the returned query. It's not an object, therefore you can't call a method on it.

Replies are listed 'Best First'.
Re^2: hashref problem
by ikegami (Pope) on Feb 20, 2008 at 19:45 UTC

    So the solution is

    $db->do('INSERT INTO memberlog (username, gamename, host, date) VA +LUES (?, ?, ?, ?)', undef, $userauth, $gamename, $host, $date); $db->do('UPDATE vault SET gamecounter=gamecounter+1 WHERE gamename +=?', undef, $gamename); return $db->selectrow_hashref('SELECT * FROM vault WHERE gamename= +?', undef, $gamename);

    Or if you just want the updated gamecounter,

    $db->do('INSERT INTO memberlog (username, gamename, host, date) VA +LUES (?, ?, ?, ?)', undef, $userauth, $gamename, $host, $date); $db->do('UPDATE vault SET gamecounter=gamecounter+1 WHERE gamename +=?', undef, $gamename); return ( $db->selectrow_array('SELECT gamecounter FROM vault WHERE game +name=?', undef, $gamename) )[0];
    A reply falls below the community's threshold of quality. You may see it by logging in.