Mysql
 sql >> Database >  >> RDS >> Mysql

Struttura del file di testo (tabelle)

CSV è banale con fputcsv :

$fh = fopen('output.csv', 'w') or die("can't open file");

// output header and first row
$row = mysql_fetch_assoc($result)
fputcsv($fh, array_keys($row));
fputcsv($fh, $row);

// output the remaining rows
while ($row = mysql_fetch_assoc($result)) {
    fputcsv($fh, $row);
}

fclose($fh);