|
$tuaquery= "select * from tableec..";
$result_home = mysql_query ($tuaquery,$parametriconnesionedb) or mysql_die("ERRORE ATTENZIONE ALLA SELECT!!1");
while($valore=mysql_fetch_array($result_home) )
{
//crei il tuo file
$creafile = fopen("test/$ID.csv","w+");
//scrivo nel file
fwrite($creafile,"<html>
//ti crei tante var qunati sono i campi della tua tabella
$nomevar=$valore["nomecampo"];
<table>
<TR valign=top>
<TD>$nomevar</TD>
</tr>
</table>
</html>");
//chiudo il file
fclose($creafile);
}
|