in reply to Perl AND SQL Help

The first problem I see is that $name is local to the while block.
It looks like you are expecting only one row from this query?
If so you don't need a while
Also, you don't test for error on the fetch.
try this...
$pointer = $sth->fetchrow_hashref; die $sth->errstr if $sth->errstr; print "NAME = $pointer->{name}<br>";

Replies are listed 'Best First'.
Re: Re: Perl AND SQL Help
by Anonymous Monk on May 24, 2004 at 15:50 UTC
    I do need more rows from this query, I am only showing one as an exemple.
      I that case, shouldn't your print statement be inside the while clause?

      You will get better answers if you show us the actual code instead of just this exemple.