in reply to Another meek DBI question

Few things:

  1. I think this is a really reduced version of the code and as such you may be cutting something out. Why? You use strict and don't declare $uname, $fname, $fgroup, $dmon, or $accts yet still get output.
  2. $sth->execute() can also fail. Add an or die "Execute failed: ",$dbh->errstr
  3. Make certain you're getting results with print "Rows found: ",$sth->rows
  4. I think there's a problem with your password ;-P

Hope this helps.

antirice    
The first rule of Perl club is - use Perl
The
ith rule of Perl club is - follow rule i - 1 for i > 1

Replies are listed 'Best First'.
Re: Re: Another meek DBI question
by mpeppler (Vicar) on Aug 22, 2003 at 11:11 UTC
    3. Make certain you're getting results with print "Rows found: ",$sth->rows
    Beware!

    $sth->rows() may not return any significant information for SELECT queries (i.e. it may work for MySQL, but it definitely does NOT work for Sybase or Oracle unless all the rows have already been fetched!)

    Michael