> $dbhandle->do( "INSERT INTO $table
> (name, dwarf_list, occupations)
> VALUES(\'$name\', \'$dwarves_str\', \'$occupations_str\')" );
>
> However, I get the following error:
>
> DBD::Pg::db do failed: ERROR: Unterminated quoted string
> Database handle destroyed without explicit disconnect.
> which seems to be to do with the serialized data, which seems to
> contain return characters. Is there a way around this?
Use placeholders, they make life _much_ easier. Try this:
$sth = $dbhandle->prepare( "INSERT INTO $table (name, dwarf_list,
occupations) VALUES(?, ?, ?)" );
$sth->execute($name, $dwarves_str, $occupations_str) ;
> Am I on the
> right track in using Storable to begin with?
Good question. I've found that using Storable and FreezeThaw is great if
you're dealing with DBMs or DB_Files along with MLDBM, but that using
SQL-native data structures with regular SQL-Databases is easier and more
efficient.
However, It makes my head hurt too.
;-)
----------------------------------------------------------------------------
Mit den besten Grüßen
Carl K. Cunningham
Roberts´ interactive GmbH
----------------------------------------------------------------------------
Heinrich-Schütz-Allee 29 Tel 0561.9389-30 [EMAIL PROTECTED]
34131 Kassel Fax 0561.93893-39 http://www.roberts.de
----------------------------------------------------------------------------