attribute parameter '12' is not a hash ref

James Gilbert <[email protected]> Wed, 3 Oct 2007 17:00:09 +0100
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
Hi,

I'm having problems with bind_param on particular machines. They have  
DBI v1.48 and DBD::mysql v4.005 installed.

We are using the second form of bind_param shown in the DBI man page:

   $rc = $sth->bind_param($p_num, $bind_value);
   $rc = $sth->bind_param($p_num, $bind_value, $bind_type);
   $rc = $sth->bind_param($p_num, $bind_value, \%attr);

like this:

   $sth->bind_param(1, $name, SQL_VARCHAR);

but it fails with the error:

   DBI::st=HASH(0xa94f474)->bind_param(...): attribute parameter '12'  
is not a hash ref

This always works:

   $sth->bind_param(1, $name, {TYPE => SQL_VARCHAR});

So for some reason SQL_VARCHAR(), which has the value 12, is not  
identified by DBD::mysql as the second form of bind_param. Anyone  
know why?

	James



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]