in reply to Dealing with uninitialized values
As to your error - Have you checked the DB to see what's really in there. Your retrieval and deref look fine. So I'm guessing your data says 'UsernameDBI::db=HASH(0x838242c)' and you forgot to deref something when you inserted the data.# Put question mark here for your placeholder my $sql = "SELECT * FROM users WHERE id = ?"; my $statement = $db_handle->prepare($sql) or die "Couldn't prepare query '$sql': $DBI::errstr\n"; # Put your $scalar here to be interpolated $statement->execute($user) or die "Couldn't execute query '$sql': $DBI::errstr\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dealing with uninitialized values
by driver8 (Scribe) on Oct 14, 2006 at 09:39 UTC |