Posts by checktech • 43 points
5 posts
-
-2
votes1
answer563
viewsQ: How to save while result to txt file?
Generates txt, but saves only the last entry of the database and in the precise case of all data. $querymail = mysql_query("select mat,nome from usuario "); while($data =…
-
0
votes2
answers201
viewsQ: Add header and footer in txt file generated via phptxt
This script generates a txt extracted from Mysql: <?php include "conexao.php"; $querymail = mysql_query("select cod,nome,tipo,valor from livros"); fopen("txt/relatorio.txt", "w+"); while($data =…
-
1
votes1
answer78
viewsQ: Format in R$ rescued values with SUM
I want to show the values in currency format include "conect.php"; $sql = "SELECT SUM(preco) as SOMA, cod FROM valores GROUP BY cod ORDER BY SOMA DESC"; $exec = mysql_query($sql); while ($rows =…
-
0
votes2
answers1777
viewsQ: How to force the download of a text file?
How to Force Download a Text File? I have this code but it is not downloaded, when I click on the link its contents is displayed by the browser. <?php include "conecte.php"; $querymail =…
-
1
votes1
answer974
viewsQ: Format data and save to txt with php
The goal is to extract data from the base and save in txt file... The script works correctly when I enter only $log (name) on the line if (!fwrite($savelog, $log)) in an attempt to add $log2…