It's a perl language thing.  fetchrow_hashref returns a hashref, not a
hash.  You can also use the following two syntaxes, which may make more
sense to you:

The same thing, more explicitly:
>       fieldname: [+ ${$hashed_row}{'fieldname'} +]<br>

Syntactic sugar, everyones favorite treat:
>       fieldname: [+ $hashed_row->{'fieldname'} +]<br>

Ed

On Tue, 24 Jun 2003, Richard Schilling wrote:

> Just a quick question, and perhaps it's a Perl language question.  I
> forget, but why do you have to reference a hash with a double "$$" when
> you use fetchrow_hashref?
>
>       [-
>       use DBI;
>
>       # code to open connection, run query, etc . . .
>       -]
>
>       [$ if $hashed_row = $query->fetchrow_hashref $]
>       fieldname: [+ $$hashed_row{'fieldname'} +]<br>
>       [$ endif $]
>
> Don't know why but for some reason I'm drawing a blank . . .
>
> Thanks.
>
> --Richard
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to