Jason Erickson wrote:
> 
> I'm using placeholders to prepare several INSERT statements and was
> wondering if there's an easier way of expressing how many values you are
> going to pass to the execute statement.  The tables I'm updating can have as
> many as 41 columns, that's alot of question marks, and prone to errors....

I use DBIx::Abstract, which let's you do this:

require DBIx::Abstract;
my $db = DBIx::Abstract->connect($DBH); # connect using existing handle
$db->insert('table',\%hash_ref); 

It takes care of the placeholders behind the scenes.

  -mark 

 . . . . . . . . . . . . . . . . . . . . . . . . . .
   Mark Stosberg              Principal Developer  
   [EMAIL PROTECTED]       Summersault, LLC     
   765-939-9301 ext 223       website development  
 . . . . . http://www.summersault.com/ . . . . . . .

Reply via email to