Ecrire le resultat d'une requete dans un fichier texte
Posté : 25 juil. 2007, 12:27
Bonjour
Quelqun pourrait-il m'indiquer un tutoriel ou me dire comment faire ?
je voudrais ecrire le resultat d'une requête dans un fichier txt.
voila comment elle s'affiche dans la page, je voudrais reproduire la même chose dans le fichier txt:
je suppose qu'il faut écrire ça dans une variable, mais ensuite...
merci
Quelqun pourrait-il m'indiquer un tutoriel ou me dire comment faire ?
je voudrais ecrire le resultat d'une requête dans un fichier txt.
voila comment elle s'affiche dans la page, je voudrais reproduire la même chose dans le fichier txt:
Code : Tout sélectionner
MARQUE;;NOM PRODUIT;;COULEUR;;CATEGORIE;;PRIX;;PROMO;;CODE_PRODUIT;;FRAIS DE PORT<br />
<?php do { echo($row_WADAarticles['marque']); ?>;;<?php echo($row_WADAarticles['reference']); ?>;;Coloris:nous consulter;;<?php echo($row_WADAarticles['categorie']); ?>;;<?php echo($row_WADAarticles['prix']); ?>;;;;<?php echo($row_WADAarticles['ID']); ?>;; <?php
if ($row_WADAarticles['prix']<= 60 && $row_WADAarticles['prix']>0)
{
echo "10.00";
}
elseif ($row_WADAarticles['prix']> 60 && $row_WADAarticles['prix']< 600)
{
echo "20.00";
}
elseif ($row_WADAarticles['prix']>= 600)
{
echo "00.00";
}
?><br />
<?php } while ($row_WADAarticles = mysql_fetch_assoc($WADAarticles)); ?>
merci