in reply to Re^3: Class::DBI error?
in thread Class::DBI error?

ahhh, so would you recommend wrapping it in eval{} and checking $@?
UPDATE:Murr...should probably just check $thread for emptyness, right?
meh.

Replies are listed 'Best First'.
Re^5: Class::DBI error?
by cbrandtbuffalo (Deacon) on Jun 10, 2005 at 12:14 UTC
    No, I think a simple 'if' should do the trick:
    if( not $thread){ # Send a message to the user in some way... print"No record found for thread number: $id"; # Get out of the structure in some way... exit; }
      Ah, fantastic. It's still returning zeros however..
      meh.
        Ah, but that's good since you now know that you are getting a record back.

        Now you can start looking at the data. Try this:

        warn "Does thread have some data? " . $thread->author . "\n";
        Right after that 'if' check. Basically, start looking at the data to be sure $thread has what you think.