in reply to DBI and BLOBs
You should really be using placeholders, specify your table entries explicitly, and check the return value of $dbh->prepare and $dbh->execute:
use strict; my $boo = $dbh->prepare('INSERT INTO patblob (varchar, id) VALUES (?, +?)') or die "Database error: " . $dbh->errstr; $boo->execute('Yo', $blobid) or die "Database error: " . $dbh->errstr; $dbh->commit; $boo->finish();
The above code is safer and should give you proper error messages on failure. It's hard to debug code when you don't have proper error messages.
Update: Forgot something. It appears that $blobid is a BLOB, but you're inserting it into a numeric field. Huh?
----
Reinvent a rounder wheel.
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBI and BLOBs
by diotalevi (Canon) on Mar 24, 2003 at 15:51 UTC | |
|
Re: Re: DBI and BLOBs
by Improv (Pilgrim) on Mar 24, 2003 at 15:56 UTC | |