Why is data always inserted?

Source: Internet
Author: User
Why is data always inserted? This post was last edited and inserted from one database to another by yxqc at 2014-05-0514: 20: 32. The table contains 80 million pieces of data, which passes. While ($ mssql_row & nbsp; mssql_fetch_array ($ rs) & nbsp; & nbsp ;{& nbsp; & Why is nbs data always inserted?

This post was last edited by yxqc at 14:20:32 on

Insert data from a database to another database. The table contains 80 or 100,000 pieces of data.

while($mssql_row = mssql_fetch_array($rs)) {
$MID = $mssql_row[0];
$sql = "insert into Flow01(TDM,) values ('$TDM',)";
mysql_query($sql);
}


The IDs of the inserted table are already more than million, and there is no such thing as stopping. is it an endless loop ???
------ Solution --------------------
Bang Ding should not be an endless loop. you can view the number of records obtained by the output.
------ Solution --------------------
This section does not show all the code.
------ Solution --------------------
It is an endless loop.
------ Solution --------------------
You can also use
Select count (*) from t_TuNao
View the total number of records ~~

------ Solution --------------------
$ SQL = "insert into Flow01 (TDM,) values ('$ tdm ',)";
Next we will add a $ SQL statement for log processing. after running the SQL statement, we will see what the SQL statement is for the preceding statement.
File_put_contents ('SQL. log', $ SQL. "\ r \ n", FILE_APPEND );

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.