Cody Pendant has asked for the wisdom of the Perl Monks concerning the following question:
So in my SQL I had to refer to them as table_a.id and table_b.id or whatever.
When I came to grab them from the hash as $ref->{'table_a.id'} and $ref->{'table_b.id'} I found they weren't there. There was just one $ref->{'id'}, so one had clobbered the other.
This didn't ruin my life, I just did it as an array instead, but it was frustrating. I imagined that DBD::MySQL would DWIM and it didn't.
I've had a quick glance at CPAN documentation and can't see it discussed. Any thoughts?
($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss') =~y~b-v~a-z~s; print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hash-clobbering in DBD's fetchrow_hashref
by gmax (Abbot) on Aug 27, 2003 at 00:15 UTC | |
|
Re: Hash-clobbering in DBD's fetchrow_hashref
by blokhead (Monsignor) on Aug 27, 2003 at 00:14 UTC | |
|
Re: Hash-clobbering in DBD's fetchrow_hashref
by menolly (Hermit) on Aug 27, 2003 at 00:13 UTC | |
|
Re: Hash-clobbering in DBD's fetchrow_hashref
by mpeppler (Vicar) on Aug 27, 2003 at 00:15 UTC | |
|
Re: Hash-clobbering in DBD's fetchrow_hashref
by Cody Pendant (Prior) on Aug 27, 2003 at 00:29 UTC | |
by jdtoronto (Prior) on Aug 27, 2003 at 01:44 UTC | |
by jeffa (Bishop) on Aug 27, 2003 at 12:54 UTC | |
by Cody Pendant (Prior) on Aug 27, 2003 at 22:12 UTC | |
by jeffa (Bishop) on Aug 28, 2003 at 01:04 UTC |