Código :
mysql_select_db($database_conex1, $conex1);
$query_clientes = "select * from clientes";
$clientes = mysql_query($query_clientes, $conex1) or die(mysql_error());
$row_clientes = mysql_fetch_assoc($clientes);
$totalRows_clientes = mysql_num_rows($clientes);
///////
$archivo="cop_seg/".$_GET['archivo'].".txt";
#Abrimos el fichero en modo de escritura
$DescriptorFichero = fopen($archivo,"w");
// Escribimos los datos
$datos = mysql_fetch_array($clientes);
do{
fputs($DescriptorFichero,"INSERT INTO clientes VALUES ($datos[0],'$datos[1]')\r\n");
}while ($row_clientes = mysql_fetch_row($clientes));
#Cerramos el fichero
fclose($DescriptorFichero);
//////////
Y lo hace "casi bien": La tabla tiene 21 registros pero solo me escribe 20...
Mil gracias por anticipado
