长文不会更新

I am trying to update my long text mysql field. It has been working previously with no issues what-so-ever, but all of sudden now it won't update. Here is the code

$productTitle = $_POST['product_title'];
$productDesc = $_POST['product_desc'];

$updateProductDesc = "UPDATE product_desc SET product_desc='$productDesc' 
WHERE product_sku='$productSku' ";
mysql_query($updateProductDesc, $db_custom);

I know I should be using mysqli but other than that all the syntax is correct. Or am I completely missing something.

many reasons your code will not work:

Step 1

Change

$productDesc = $_POST['product_desc'];

Into

$productDesc = addslashes($_POST['product_desc']);

Step 2

Before update, add mysql_real_escape_string($productDesc);

Check your database and put product_desc type on TEXT

Step 3

Verify if product_sku='$productSku' is viable.

Extra step

mysql_query() is depreciated. Go for mysqli

If all has been well before, odds are that your description field has some offending character. Yogesh Suthar is right that you should check the error. Try escaping the value with mysql_escape_string()