At 11:57 am +0100 19/3/01, Bart Lateur wrote:
>  >$dbhandle->do("CREATE TABLE data_sets (name CHAR(10), dwarf_list
>>CHAR(100), occupations CHAR(200))");
>>           
>>$cursor = $dbhandle->prepare( q{INSERT INTO data_sets (name,
>>dwarf_list, occupations) VALUES(?, ?, ?)} ) || die $dbhandle->errstr;
>>
>>$cursor->execute($name, $dwarves_str, $occupations_str) || die
>>$dbhandle->errstr;
>
>
>>and this is the error:
>>
>>ERROR:  Unterminated quoted string
>
>Are you sure your frozen data fits into the 100 and 200 bytes
>respectively that you've put asside?

I would  have thought so.

To be certain, I reduced the dwarves array to one dwarf and the 
occupations hash to one name=value pair, and increased the size of 
the records to 1000 and 2000 characters, respectively (I'm allowed 
8000?).

I still get the same error.

If I print the contents of the serialized data, this is what I get:

' HappyXX
 EntertainerXHappyX'

It seemed to me initially (and still does) that Storable is using 
return characters (or newlines) to delimit the data, and that this is 
causing the SQL to fail.

Does that make sense?

If that is what's happening, how do other people store hashes into 
SQL databases? Or don't they?
-- 
My brain hurts!
SeanC
                      Mediatek Training Institute
            26 Crart Ave., Berea, Durban, South Africa 
<-- New Address
    phone: +27 (0)31 202 1886              [EMAIL PROTECTED] <-- 
New Phone Number
       fax: +27 (0)31 202 1767 
<-- New Fax Number
                   <http://members.nbci.com/s_carte/>

Reply via email to