I'm trying to save a byteArray of a jpg from an as3 project through amfphp to then use php/mySQL to save it to a BLOB on my database. Here's my php function
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;
}
}
but i keep getting this error back:
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
Any suggestions on how to resolve this?