cormanaz has asked for the wisdom of the Perl Monks concerning the following question:
I want to take a data structure and stick it into a MySQL table for storage. I am trying to do it using mod Storable like so
But I get the following error no matter whether the "test" column is defined as text or a blob, and whether $frozen in the SQL statement is single-quoted or not:my $frozen = freeze($data); dosql("insert into blobtest (key,test) values (1,\'$frozen\')");
DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key,test) values (1,'1234' at line 1 at C:\projects\threadagent\testdbthreadstore.pl line 34. Could not execute MySQL statement: insert into blobtest (key,test) values (1,'1234What am I doing wrong?
TIA.......Steve
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Putting mod Storable output into MySQL
by pg (Canon) on Oct 15, 2005 at 17:03 UTC | |
by cormanaz (Deacon) on Oct 15, 2005 at 18:16 UTC | |
by pg (Canon) on Oct 15, 2005 at 18:36 UTC | |
by cormanaz (Deacon) on Oct 15, 2005 at 23:17 UTC | |
|
Re: Putting mod Storable output into MySQL
by merlyn (Sage) on Oct 15, 2005 at 15:20 UTC | |
by cormanaz (Deacon) on Oct 15, 2005 at 16:04 UTC | |
|
Re: Putting mod Storable output into MySQL
by szbalint (Friar) on Oct 15, 2005 at 15:04 UTC |