-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of gnari Sent: Tuesday, November 30, 2004 4:48 PM To: [EMAIL PROTECTED] Subject: Re: [GENERAL] change natural column order
From: "Steve Atkins" <[EMAIL PROTECTED]> > > Would you care to expand on why you think this... > > my $row = $dbh->selectrow_hashref("select * from $table"); > print 'foo = ', $row{'foo'}; > > ...is inherently a a code defect? because it does not work ? (you mean $row->{'foo'}) sorry, could not resist :-) >> There is an exception to every rule. If you need a hash for the whole row, then you need all the columns. And while we are at it: $dbh->selectrow_hashref("SELECT * FROM $table LIMIT 1"); Or something along those lines would be a bit less absurd. To do a table scan to select a single value is criminal. "SELECT *" is a horrible disease, coughed up by those who do not know what they want most of the time. << ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]