I made a little code to update record in database like this:
require_once('includes/config.php');
if ((isset($_POST["DO_update"])) && ($_POST["DO_update"] == "edit_product")) {
$ProductID = $_POST["txtProductID"];
$CategoryID = $_POST["txtCategoryID"];
$ProductName = $_POST["txtProductName"];
$ProductPrice = $_POST["txtProductPrice"];
$IsRebate = $_POST["selIsRebate"];
$RebatePrice = $_POST["txtRebatePrice"];
$ImageFileName = $_POST["txtImageFileName"];
$BigImageFileName = $_POST["txtBigImageFileName"];
$ProductDetails = $_POST["txtProductDetails"];
$query_update = "UPDATE ks_products SET `prod_name` = '$ProductName'";
$query_update .= ", `prod_price` = '$ProductPrice'";
$query_update .= ", `prod_is_rebate` = '$IsRebate'";
$query_update .= ", `prod_rebate_price` = '$RebatePrice'";
$query_update .= ", `prod_image` = '$ImageFileName'";
$query_update .= ", `prod_big_image` = '$BigImageFileName'";
$query_update .= ", `prod_details` = '$ProductDetails'";
$query_update .= ", `cat_id` = '$CategoryID'";
$query_update .= "WHERE `prod_id` = '$ProductID' LIMIT 1";
mysql_select_db($database_index, $index);
mysql_query($query_update, $index) or die(mysql_error());
}
No error found but the record cannot be updated, plz help me!
Only prod_price, prod_is_rebate and prod_rebate_price column is mediumint, others is varchar.
PHP version 5.0.4, MySQL version 4.1