我正在尝试通过 amfphp 从 as3 项目中保存 jpg 的 byteArray,然后使用 php/mySQL 将其保存到我数据库上的 BLOB 中。这是我的php函数
function saveImage($uid, $name, $tag1, $tag2, $tag3, $ba) {
$result = mysql_query("INSERT INTO images (uid,name,tag1,tag2,tag3,thumb) VALUES ('$uid','$name','$tag1','$tag2','$tag3','$ba->data');");
$error = mysql_error();
if ($error) {
return $error;
}
else {
return $result;
}
}
但我不断收到此错误:
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 '()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄ' at line 1
关于如何解决这个问题的任何建议?