我有以下 perl 提取物:
$query = "INSERT INTO test (`MACADDR`)
VALUES ($MACADDR)";
print $query,"\n";
$db->do($query);
尝试插入mysql时出现以下错误,我的mac地址是000E38F4E9CC:
DBD::mysql::db do 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 '0E38F4E9CC)' at line 2 at insertmac.pl line 156.
perl mysql dbi 可以插入mac地址吗?除了mac地址,我的其他记录都可以正确插入。
任何想法?谢谢。