Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
My code (with line numbers) is hereCan't call method "bind_columns" on an undefined value at manage.pl li +ne 73.
Can anyone see what might be going wrong?000068: my $data = qq(SELECT catname, path, root FROM categories WH +ERE root = "1" ORDER BY catname ASC); 000069: my $sth = $dbh->prepare($data); 000070: $sth->execute() or die $dbh->errstr; 000071: 000072: my ($catname, $path, $root); 000073: my $sth->bind_columns(\$catname, \$path, \$root); 000074: 000075: while($sth->fetch) 000076: { 000077: print qq~ 000078: <a href="manage.pl?process=categories&path=$path">$catna +me</a><br> 000079: ~; 000080: }
2007-03-29 Retitled by planetscape, as per Monastery guidelines
Original title: 'an't call method "bind_columns" on an undefined value'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't call method "bind_columns" on an undefined value
by betterworld (Curate) on Mar 28, 2007 at 00:33 UTC | |
|
Re: Can't call method "bind_columns" on an undefined value
by grinder (Bishop) on Mar 28, 2007 at 08:00 UTC | |
|
Re: Can't call method "bind_columns" on an undefined value
by andreas1234567 (Vicar) on Mar 28, 2007 at 08:39 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |