select aid,aname,ownerid,photonum from pw_cnalbum where atype='1'
into outfile '3.txt'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
上面的语句可以在数据库中成功执行,却一直没能通过php文件成功。最后只能放弃,继续尝试研究主楼提到的方法。最后,基本可以实现我的想法吧。文件的保存路径是:
F:/zhangjingyu/phpwind/phpStudyB/MySQL/data/test/3.txt
内容大致如下(“\n”换成了“<br>”):
"14","默认相册","1","13"<br>"15","无线电2册","1","6"<br>"16","无线电3册","1","10"<br>"17","温馨家园","1","5"<br>"18","无线电301册","1","11"<br>"19","无线电300册","1","0"<br>