こんな感じで、SELECT分の後にINTO OUTFILEを追加してあげればOKです。
1 2 3 4 5 6 |
SELECT * FROM user WHERE status = 1 ORDER BY id ASC INTO OUTFILE '/tmp/status_user.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'; |
Twitter:
Warning: Undefined array key "Twitter" in /home/sazaeau/mizoshiri.com/public_html/blog.mizoshiri.com/wp-content/plugins/sns-count-cache/sns-count-cache.php on line 2897
0 | Facebook: 0 | Google Plus:
Warning: Undefined array key "Google+" in /home/sazaeau/mizoshiri.com/public_html/blog.mizoshiri.com/wp-content/plugins/sns-count-cache/sns-count-cache.php on line 2897
0 | Hatena: 0 | Pocket: 1 | Total: 1 | Feedly: 0
Sorry. No data so far.