You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Available in r300.
I can't believe I got this working. It doesn't use the database driver's
functionality to do this (dbi doesn't let the dbdriver provide its own
overloaded
statement handle (future feature)), but rather implements it for all dbdrivers
by
being defined on DBIstatement.
It has received minor testing against a mysql database (although since it is
implemented for on DBIstatement, should work for all dbdrivers).
$sth = $dbh->prepare(...);
# variables should exist in the scope before calling bind_columns on them
$result1 = '';
$result2 = '';
$result3 = '';
...
$sth->bind_columns($result1, $result2, $result3, ...);
$sth->execute(...);
while($sth->fetch()) { # returns false when no more rows
print "Got ($result1) = $result2\n";
}
Note that you can call ->bind_columns multiple times and it will append to the
currently assigned list:
$sth->bind_columns($result1);
$sth->bind_columns($result2, $result3);
is exactly the same as above. If you need to bind new variables to an already
existing statement, call bind_columns without any arguments to clear it out
first.
Original issue reported on code.google.com by
[email protected]
on 6 Oct 2008 at 12:42The text was updated successfully, but these errors were encountered: