DBI and DBD::mysql pseudohash results set?

Dan Bolser <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
Hi,

I was thinking about loading the rows of a $sth results set into a
pseudohash so that the columns could be accessed by either the column name
or the column index.

This functionality is supported by a pseudohash

Snipet from http://perlmonks.thepen.com/19636.html

$struct = [{foo => 1, bar => 2}, "FOO", "BAR"];
$struct->{foo};  # same as $struct->[1], i.e. "FOO"
$struct->{bar};  # same as $struct->[2], i.e. "BAR"

__END__

However, I heard that the way pseudohashes work may change, and
pseudohash code may become obsolete or broken.

Snipet from 
http://www.perl.com/pub/a/2001/05/p5pdigest/THISWEEK-20010520.html

Michael Schwern asked that pseudo-hashes should be removed from Perl 5.8
and onwards.

__END__

Is the above style of lookup already handled by DBI? You can do it in PHP.

Any feedback would be welcome,

All the best,
Dan.


-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.