批量执行:
update `erp_orders` set `orders_shipping_code`=‘RL007169726CN‘ where `erp_orders_id`=1055614141 and orders_shipping_code=‘‘; update `erp_orders` set `orders_shipping_code`=‘RL007169730CN‘ where `erp_orders_id`=1055614144 and orders_shipping_code=‘‘; update `erp_orders` set `orders_shipping_code`=‘RL007169743CN‘ where `erp_orders_id`=1055874016 and orders_shipping_code=‘‘; update `erp_orders` set `orders_shipping_code`=‘RL007169757CN‘ where `erp_orders_id`=1055874027 and orders_shipping_code=‘‘; update `erp_orders` set `orders_shipping_code`=‘RN602488477CN‘ where `erp_orders_id`=1055878179 and orders_shipping_code=‘‘; update `erp_orders` set `orders_shipping_code`=‘RG019175635CN‘ where `erp_orders_id`=1055880108 and orders_shipping_code=‘‘;
出错信息:
update `erp_orders` set `orders_shipping_code`=‘RL007169726CN‘ where `erp_orders_id`=1055614141 and orders_shipping_code=‘‘;# MySQL 返回的查询结果为空 (即零行)。 update `erp_orders` set `orders_shipping_code`=‘RL007169730CN‘ where `erp_orders_id`=1055614144 and orders_shipping_code=‘‘;# MySQL 返回的查询结果为空 (即零行)。 update `erp_orders` set `orders_shipping_code`=‘RL007169743CN‘ where `erp_orders_id`=1055874016 and orders_shipping_code=‘‘;# MySQL 返回的查询结果为空 (即零行)。 update `erp_orders` set `orders_shipping_code`=‘RL007169757CN‘ where `erp_orders_id`=1055874027 and orders_shipping_code=‘‘;# MySQL 返回的查询结果为空 (即零行)。 update `erp_orders` set `orders_shipping_code`=‘RN602488477CN‘ where `erp_orders_id`=1055878179 and orders_shipping_code=‘‘;# MySQL 返回的查询结果为空 (即零行)。 update `erp_orders` set `orders_shipping_code`=‘RG019175635CN‘ where `erp_orders_id`=1055880108 and orders_shipping_code=‘‘;# MySQL 返回的查询结果为空 (即零行)。
再updata语句较多如何批量导入:
$con=$con = mysql_pconnect("localhost:3306","root","****"); mysql_query("SET NAMES utf8"); mysql_select_db("erp_database", $con); $fp=fopen("/home/xyt/桌面/a.null", "r"); while (!feof($fp)) { $line = fgets($fp); echo $line,"<br />"; mysql_query($line); echo "影响蛤功能书:".mysql_affected_rows()."<br/>"; }
原文:http://www.cnblogs.com/canbefree/p/3867742.html