title: How to automatically go to the next rows and Insert multiple rows using single insert commnad in php using mysql
body: <p>I already saw other post related to this question, but they did not solve my problem. I want to automatically go to next rows and want to insert that row in the table. I am transfering sample of data from another database. I want to insert large set of rows... Right now I am getting first row repeatedly in all rows. I need to go to to next rows automoatically</p>
  
  <p>Below is my sample code... </p>
  
  <pre><code>while ($row = mysql_fetch_array($query)) {
      $sql = "INSERT INTO table_name (info1, info2, info3,...) " 
            ."VALUES (" . $row['info1'] . "," . $row['info2'] . "," . $row['info3'] . "),  
                     (" . $row['info1'] . "," . $row['info2'] . "," . $row['info3'] . "),  
                     (" . $row['info1'] . "," . $row['info2'] . "," . $row['info3'] . "),  
                     (" . $row['info1'] . "," . $row['info2'] . "," . $row['info3'] . ")";
  }  
  </code></pre>