title: function that updates the database every 10 min
body: <p>I have two databases.  Below is the code that I am using to get information from the first database.</p>
  
  <pre><code>$myrow = mysql_query("SELECT SUM(uploaded) FROM peers",$db);
  $sum = mysql_fetch_array($myrow);
  $c = $sum[0] / 1000000;
  $d = $c / 1000000;
  $l = round($d,3);
  
  
  echo "&lt;p&gt;UP: $l TB&lt;/p&gt;";
  
  
  $myrow1 = mysql_query("SELECT SUM(downloaded) FROM peers",$db);
  $sum1 = mysql_fetch_array($myrow1);
  $a = $sum1[0] / 1000000;
  $b = $a / 1000000;
  $k = round($b,3);
  
  echo "&lt;p&gt;DW: $k TB&lt;/p&gt;";
  </code></pre>
  
  <p>I need to add this information to my second database and update it every 10 min with new fresh information from first database. I am using phpmyadmin. </p>