这是我的 SQL 更新查询。但问题是当我更新表的标题但在标题中存在倒单逗号时发生错误?因为在更新查询中,逗号用于 php 变量。错误如:
[ UPDATE zen_meta_tags_products_description SET metatags_title = 'What experiences are being evoked in Brancusi's Bird' Where products_id=412 ]
查询如下:
while(!$ab->EOF)
{
echo $count. " ". $p_id= $ab->fields['products_id'];
echo $p_name= $ab->fields['products_name'];
echo " <br>";
echo "meta title : ".$m_name= $ab->fields['metatags_title'];
echo " <br>";
$db->Execute(" UPDATE zen_meta_tags_products_description SET metatags_title = '$p_name' Where products_id=$p_id ");
$count++;
$ab->MoveNext();
}