开发者

Pulling information from a Database table php

开发者 https://www.devze.com 2023-03-05 02:10 出处:网络
I know this has probably been asked a lot on here, but I am just stumped. I am working for a company wit开发者_运维知识库h an e-commerce site built on top of java. What I was asked to do today was to

I know this has probably been asked a lot on here, but I am just stumped. I am working for a company wit开发者_运维知识库h an e-commerce site built on top of java. What I was asked to do today was to pull out basically all the information from the table in a query and then write it to a textfile in a nice clean table layout. I really have no experience with this sort of thing.


The following commandline can be used to dump a MySQL table to a textfile in table format. I have only tried this on linux, but something similar should work on any system with MySQL.

echo "SELECT * FROM name_of_table" | mysql -t -u username -h host -p password database > outfile
0

精彩评论

暂无评论...
验证码 换一张
取 消