难道不是mysql的语法有提供嘛?
所在版块:技术の宅 发贴时间:2005-04-19 20:13

用户信息
复制本帖HTML代码
高亮: 今天贴 X 昨天贴 X 前天贴 X 
SELECT a,b,a+b INTO OUTFILE '/tmp/result.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM test_table;

.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!

 相关帖子 我要回复↙ ↗回到正文
PHP CSV 的问题. 正红花油   (187 bytes , 685reads )
难道不是mysql的语法有提供嘛? 一棵开花的树   (141 bytes , 275reads )
应该就是直接用逗号格开,然后存为csv扩展名的吧。。8过 昨是今非旧时光   (419 bytes , 459reads )
well, last night it was too late, so did not post the exact address, pls come in MrDJay   (371 bytes , 303reads )
原来是这样哦。。谢谢~~ 昨是今非旧时光   (4 bytes , 308reads )
谢谢两位了.开始查了一下API,不过只查到了一个fgetcsv 正红花油   (0 bytes , 257reads )
of coz there is. since CSV = comma seperated Value, therefore MrDJay   (171 bytes , 320reads )