title: Bulk update to mySQL work too slow
body: <p>currenly i use a simple code to update gender in my mysql</p>
  
  <p>my code:</p>
  
  <pre><code>    &lt;?php
  ini_set('max_execution_time', 30000); 
      $row = 0;
      if (($handle = fopen("list.csv", "r")) !== FALSE) {
          while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
              $num = count($data);
  
              for ($c=0; $c &lt; $num; $c++) {
              $name = $data[0];   
              $gender = $data[1]; 
              }
      // connect to db
      mysql_connect("***", "***", "***") or die("Connection Failed");
      mysql_select_db("info")or die("Connection Failed");
          $query = "UPDATE data SET gender = '$gender' WHERE fname = '$name'";
          if(mysql_query($query)){
                          $row++;
      echo "$row: ";      
      echo '&lt;font color="RED"&gt;' . $name  . '&lt;/font&gt; &lt;br&gt;';  
  
          }
  
  
          }
          fclose($handle);
      }
   ?&gt;
  </code></pre>
  
  <p>code works but very slow,
  can process up to 10k records per 1 hour and its too slow for me</p>
  
  <p><strong>can someone give me an idea what to do with it to increase speed</strong></p>