Dean Arnold wrote:
Not certain I understand your issue, but, from the DBD::mySQL POD (as posted on CPAN):
my $sth = $dbh->prepare("SELECT * FROM $table"); if (!$sth) { die "Error:" . $dbh->errstr . "\n"; } if (!$sth->execute) { die "Error:" . $sth->errstr . "\n"; } my $names = $sth->{'NAME'}; my $numFields = $sth->{'NUM_OF_FIELDS'}; for (my $i = 0; $i < $numFields; $i++) { printf("%s%s", $i ? "," : "", $$names[$i]); } print "\n";
Is there something you're trying to do that this doesn't ?
NOTE: this is the std. way of fetching field info for a resultset, tho some drivers/dbms's don't populate that info until after execute(), but a properly conformant driver should populate it (and TYPE, PRECISION, SCALE, and NULLABLE) even if the resultset is empty.
Dean Arnold Presicient Corp.
That's *precisely* what I want. Thankyou. Still learning this stuff...
-- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au
