我的python代码在XML文件上运行,并检查所有引用是否都在数据库(MySQL数据库)中。 当产品不在数据库中时,输出为“产品不在数据库中” 检查过程在python代码中:
str_sql = "select id_product from ps_product where reference = '" + makat + "';"
str_sql = str_sql.replace('"\"', "")
productID = get_productId(str_sql)
if (productID == 'error' or productID == 'None'):
errorReason = "product don't exsits in DB"
print("error: product don't exsits in DB - ", productName,", ",makat)
例如,所需的参考是F0FB0056IV。 该引用在DB table ps_product中有一条记录,但仍然得到0个结果
为什么?
目前没有回答
相关问题 更多 >
编程相关推荐