Think before you speak, read before you think.

php导出mysql到csv

by

in

    // connect to database
    include("conectar.php");

    $fp = fopen('exporterrors.csv', 'w');

    $queryString = "SELECT * FROM url_monitor where monitor='off' order by object_id";
    $rows = mysql_query($queryString);

    while ($row = mysql_fetch_assoc($rows)) {
        fputcsv($fp, $row);
    }

    fclose($fp);


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *