<?php
 require "conecta.php";
 $sql="select * from m070013;";
 $res=mysql_query($sql,$con) or die(mysql_error());
 while ($fila=mysql_fetch_array($res)){
  $interno=$fila[0];
  $barra=$fila[1];
  if (strlen($barra)>0 && $barra!='[NULL]'){//si 1
   $sqlg="update M07001 set cod_barra='$barra' where cod_interno='$interno';";
   $resg=mysql_query($sqlg,$con) or die(mysql_error());
  }//si 1
  echo $interno . "<br>";
 }//wend
?>