DBI/DBD implementors,

The patch below adds a bind_columns example to
bind columns to array elements.

Cheers,
Daniel Lewart
[EMAIL PROTECTED]
-----------------------------------------------------------------------
--- DBI-1.48/DBI.pm     Mon Mar 14 10:45:38 2005
+++ DBI-1.48.your_foo/DBI.pm    Tue May 10 00:00:00 2005
@@ -5852,6 +5852,15 @@
 For compatibility with old scripts, the first parameter will be
 ignored if it is C<undef> or a hash reference.

+Columns can be bound to the elements of an array:
+
+  $sth->execute;
+  my @row = @{$sth->{NAME}}; # Or (undef) x $sth->{NUM_OF_FIELDS};
+  $sth->bind_columns( \(@row) );
+  while ($sth->fetch) {
+      print "$row[0]: $row[1]\n";
+  }
+
 Here's a more fancy example that binds columns to the values I<inside>
 a hash (thanks to H.Merijn Brand):

-----------------------------------------------------------------------

Reply via email to