Malcolm on 26 Jan 2004 21:00:58 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: perl DBI question


On Monday 26 Jan 2004 3:50 pm, Gay, Jerry wrote:

> > my $quoted = $dbh->quote($hash->{'some'});

> here, you're using $hash as a reference to a hash. instead, try:
> my $quoted= $dbh->quote( $hash{some} );

That doesn't work. There's no %hash defined (as I have "use strict", it 
doesn't even compile). 

Technically
 my $hash = {'some'=>'data'};
is actually closer to:

sub get_session
{
  tie %session, 'Apache::Session::MySQL', $sessionId,
  {
     'Handle'     => $dbh,
     'LockHandle' => $dbh,
   };
   return \%session;
};

my $session = get_session();



but I don't think the simplification changes anything.

-
**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**