[prev in list] [next in list] [prev in thread] [next in thread] 

List:       msql-mysql-modules
Subject:    Re: bind_columns ??
From:       Rudy Lippan <rlippan () remotelinux ! com>
Date:       2005-04-01 4:48:30
Message-ID: Pine.LNX.4.44.0503312344020.6426-100000 () elfride ! ineffable ! net
[Download RAW message or body]

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/perl?unsub=msql-mysql-modules@progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic