----- Original Message ----- From: "Mario Sanchez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Friday, February 17, 2006 5:36 PM
Subject: Variable to a DBI object?


hello

the following statement works perfectly:

$sth->bind_columns(\$f1data, \$f2data, \$f3data);

however, if i do this

$bind = "bind_columns(" . "\\" . '$f1data, ' . "\\" . '$f2data, ' . "\\" .
'$f3data)';
$sth->$bind;

I'm using another syntax of binding colums

$sth->bind_columns(\($f1data, $f2data, $f3data));

but for your using - generating fields on the fly - I tryed this and it work

@data=('', '', '');
$sth->bind_columns(\(@data));

after $sth->fetch you can access to field values by $data[0], $data[1] ... etc.

Petr Vileta, Czech republic
(My server reject all messages from Yahoo and Hotmail. Send me your mail from another non-spammer site please.)



_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to