这里介绍了一种是利用php结合mysql的outfile成.xls文件,另一种是利用cmd命令下直接导出.xls文件的方法。
在中操作
代码如下 |
复制代码 |
include('db/db.php'); //包含连库类
$db = new db();
$result = _query(' * from market_sig into outfile "d:product3.xls";');
var_dump($result);
?>
|
在cmd方式下操作
代码如下 |
复制代码 |
mysql -uroot -p -e "select * from test.table2 " > d:a.xsl
|
总结:前一种方法需要会php人员能操作,后一种只要在mysql cmd命令下就可以方法操作了,
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn