Ver Mensaje Individual
  #3 (permalink)  
Antiguo 13/06/2011, 14:41
gabymar
 
Fecha de Ingreso: agosto-2008
Mensajes: 94
Antigüedad: 18 años, 3 meses
Puntos: 0
Respuesta: crear archivo txt en php

muchas gracias utilice mysql_fetch_array e hice otros arreglos y me funciono aqui publico mi codigo para el q lo necestie

Código PHP:
include("conexion.php"); 
$conexion = obtenerConexion(); 
$bbl="SELECT CONCAT(Libro,';',Precio) As libros FROM biblioteca where estatus=1";
$r= mysql_query($bbl, $conexion);
$fid=fopen("biblioteca.txt","w+");
fwrite ($fid, Libro;Precion");
while($row = mysql_fetch_array($r)) { 
fwrite($fid, $row['libros']);
fwrite($fid,"
n");
}
echo"
se creo el archivo";
fclose($fid);