Update Script Error

Source: Internet
Author: User

Batch execution:

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=‘‘;

Error message:

Update 'erp _ orders 'set' orders _ shipping_code '= 'l00716920.cn' Where 'erp _ orders_id '= 1055614141 and orders_shipping_code = ''; # The query result returned by MySQL is null (zero rows ). Update 'erp _ orders 'set' orders _ shipping_code '= 'l007169730cn' Where 'erp _ orders_id '= 1055614144 and orders_shipping_code = ''; # The query result returned by MySQL is null (zero rows ). Update 'erp _ orders 'set' orders _ shipping_code '= 'l007169743cn' Where 'erp _ orders_id '= 1055874016 and orders_shipping_code = ''; # The query result returned by MySQL is null (zero rows ). Update 'erp _ orders 'set' orders _ shipping_code '= 'l007169757cn' Where 'erp _ orders_id '= 1055874027 and orders_shipping_code = ''; # The query result returned by MySQL is null (zero rows ). Update 'erp _ orders 'set' orders _ shipping_code '= 'rn602488477cn' Where 'erp _ orders_id '= 1055878179 and orders_shipping_code = ''; # The query result returned by MySQL is null (zero rows ). Update 'erp _ orders 'set' orders _ shipping_code '= 'rg019175635cn' Where 'erp _ orders_id '= 1055880108 and orders_shipping_code = ''; # The query result returned by MySQL is null (zero rows ).

 

How to import multiple updata statements in batches:

$ Con = mysql_pconnect ("localhost: 3306", "root", "*****"); mysql_query ("set names utf8 "); mysql_select_db ("erp_database", $ con); $ fp = fopen ("/home/xyt/desktop/. null "," R "); While (! Feof ($ FP) {$ line = fgets ($ FP); echo $ line, "<br/>"; mysql_query ($ line); echo ": ". mysql_affected_rows (). "<br/> ";}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.