我在php中创建了一个上传和显示图像的表单... 我试图找出如何更新表中的blob字段,但它在这里不起作用的是代码
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE product SET ProductName=%s, `Description`=%s, ProductPrice=%s, ProductPic=%s, PictureType=%s WHERE ProductID=%s",
GetSQLValueString($_POST['ProductName'], "text"),
GetSQLValueString($_POST['Description'], "text"),
GetSQLValueString($_POST['ProductPrice'], "double"),
GetSQLValueString($_POST['ProductPic'], "text"),
GetSQLValueString($_POST['PictureType'], "text"),
GetSQLValueString($_POST['ProductID'], "int"));
mysql_select_db($database_dutyfree, $dutyfree);