Re: bind_columns ??
Rudy Lippan <[email protected]>
| Newsgroups | gmane.comp.db.mysql.perl |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 31 Mar 2005, Michael Gale wrote: > my( $id, $name, $title, $phone ); > $sth->bind_columns( undef, \$id, \$name, \$title, \$phone ); > > If I am not mistaken, the first statment creates the following > variables: $id, $name, $title, $phone. Basically. > > The second statement then is what I do not get, why is the "undef" there > ? and what does \$varname actually ? > IIRC, the undef should cause bind_columns to ignore the first column returned, so in your example the first column of returned by the select statement is not bound to anything, the second column is bound to $id &c. And \$varname creates a reference to $varname. For more info on references perldoc 'perreftut' -r -- MySQL Perl Mailing List For list archives: http://lists.mysql.com/perl To unsubscribe: http://lists.mysql.com/[email protected]