DBI doc curiosity
- From: ron@xxxxxxxxxxxxx (Ron Savage)
- Date: Mon, 20 Aug 2007 16:21:47 +1000 (EST)
Hi Tim
Under the write-up for fetchall_hashref is some sample code:
$dbh->{FetchHashKeyName} = 'NAME_lc';
$sth = $dbh->prepare("SELECT FOO, BAR, ID, NAME, BAZ FROM TABLE");
$sth->execute;
$hash_ref = $sth->fetchall_hashref('id');
print "Name for id 42 is $hash_ref->{42}->{name}\n";
However, after a call to $dbh -> primary_key_info(...), it seems the only
acceptable values for the parameter in the call to fetchall_hashref() are
TABLE_CAT, TABLE_SCHEM, TABLE_NAME, and KEY_SEQ. Is that right?
--
Ron Savage
ron@xxxxxxxxxxxxx
http://savage.net.au/
.
- Follow-Ups:
- Re: DBI doc curiosity
- From: Peter J. Holzer
- Re: DBI doc curiosity
- Prev by Date: Test t/85gofer.t fails on m68k
- Next by Date: Re: DBI doc curiosity
- Previous by thread: Test t/85gofer.t fails on m68k
- Next by thread: Re: DBI doc curiosity
- Index(es):