Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

DOT Syntax fails in a variable manner.

Quote Reply
DOT Syntax fails in a variable manner.
What are some reasons that the dot syntax sometimes gets the field and sometimes seems to return null:

$Fdata = $table->select( ['Links.Name],{ Live_Date => "$Date" },{ CategoryID => '7' } )->fetchrow;

This line of code apparently sometimes works for SOME FIELDS, and for others, in my case, the varchar 'name' seems to get absolutely nothing.

However if you iterate through the loop, it ALWAYS works:

my $_a;
while (my $hit = $sth->fetchrow_hashref) {
$_a = $hit->{Name};
}

Anybody hazard a guess why the behaviour is so variable. I don't think it's a cache problem.
To clarify, the behavoiur is the same for the same field all the time, but works the dot way all the time for some fields, and gets null all the time for others.

Last edited by:

scorpioncapital: Jan 25, 2005, 2:08 PM
Subject Author Views Date
Thread DOT Syntax fails in a variable manner. scorpioncapital 1772 Jan 25, 2005, 2:05 PM
Post Re: [scorpioncapital] DOT Syntax fails in a variable manner.
afinlr 1686 Jan 25, 2005, 4:30 PM