All - I'm using ActiveState, MySQL, and Win2k. I'm trying to insert data
into the following table:
+--------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+---------------------+------+-----+---------+-------+
| nodeID | tinyint(3) unsigned | YES | | NULL | |
| rxNetTime | mediumint(9) | YES | | NULL | |
| radioLat | float | YES | | NULL | |
| radioLon | float | YES | | NULL | |
| radioHeading | float | YES | | NULL | |
| antIndex | tinyint(3) unsigned | YES | | NULL | |
| rxPower | tinyint(3) unsigned | YES | | NULL | |
| dataRecord | blob | YES | | NULL | |
+--------------+---------------------+------+-----+---------+-------+
The statement I'm using is the following:
$sql_statement = "INSERT INTO rxPkt VALUES(\'$nodeId\', \'$rxNetTime\',
\'$rxLat\', \'$rxLon\', \'$rxHeading\', \'$antIndex\', \'$rxPower\',
\'$bin_msg\')";
And I get the following error:
-> prepare for DBD::mysql::db (DBI::db=HASH(0x210496c)~0x2104924 'INSERT
INT
rxPkt VALUES('1', '1', '1.11111104488373', '3.33333301544189',
'5.555554866790
......... >�?........QRL................t?.8?@UUT@??.. .
..................
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]
_`abc')')
etting mysql_use_result to 0
<- prepare= DBI::st=HASH(0x1a7f118) at unpack_v6.pl line 522.
-> DESTROY for DBD::mysql::st (DBI::st=HASH(0x1d158a8)~INNER)
<- DESTROY= undef at unpack_v6.pl line 523.
-> execute for DBD::mysql::st (DBI::st=HASH(0x1a7f118)~0x2103d64)
-> dbd_st_execute for 02103d58
ou have an error in your SQL syntax near
'()*+,-./0123456789:;<=>?@ABCDEFGHIJKL
NOPQRSTUVWXYZ[\]^_`abc')' at line 1 error 1064 recorded: You have an error
in y
ur SQL syntax near
'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab
')' at line 1
<- dbd_st_execute -2 rows
!! ERROR: 1064 'You have an error in your SQL syntax near
'()*+,-./012345678
:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc')' at line 1'
I'm a little confused because this same call is currently working for nearly
the same table (same contents, different table name). The last field in the
record is a binary file, ~150 bytes long.
Not quite what the syntax error is that it is complaining about. Any
suggestions?
Thanks,
Mark