Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/01/2009, 10:33
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: error al subir informacion a una tabla en mysql

Hola dancresi,

Prueba usar este código:
Código php:
Ver original
  1. <?
  2. include("conexion.php");
  3. $link=Conectarse();
  4. $row = 1;
  5. $fp=fopen ("archivos/rfc.txt","r");
  6. while (!feof($fp))
  7. {  
  8.   $row++;
  9.   $data = fgetcsv ($fp,100000, "|");
  10.   mysql_query("INSERT INTO tbl_rfc (rfc,name)
  11. VALUES ('$data[0]','$data[1]')",$link);
  12. echo"<font face=Courier New, Courier, monospace><b>$data[0]<br>";
  13. }
  14. fclose ($fp);
  15. ?>

Saludos