data-export/csv-export

Put data to csv file, support millions of data

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/data-export/csv-export

1.0.0 2019-08-21 08:13 UTC

This package is not auto-updated.

Last update: 2025-12-05 14:19:39 UTC


README

1,Support array to csv file
2,Support sql to csv file
Please use sql mode export if you have large volume of data

Return a zip file

Local path will be return

Usage

(new Export())->setPath('Your server local path') ->setLimit(10000) // Per file limit ->setSource(2) // 1 array , 2 sql ->setTitle([ 'author' => '作者', 'date' => '日期' ]) ->dataToFile('SELECT author, date, content, title FROM table', [ 'host' => '192.168.11.11', 'port' => '3306', 'dbname' => 'blog', 'username' => 'root', 'password' => '12345678' ]);