记录太多,WAMP 挂起,因为将没有订单的客户导出到 CSV
我正在尝试将尚未订购的客户的记录导出为 CSV,在运行该脚本时,我的本地 WAMP 服务器被拖拽,我的计算机没有响应,甚至等待了一个小时。
总客户记录为 23,000 条,而我的总订单记录为 18,000 条。
你们知道吗,我如何轻松导出到 CSV,通过一次查询轻松将客户信息(如名字、姓氏、电子邮件地址)差异化到 CSV,而不需要我的浏览器/WAMP 被拖拽。
最早的答复将不胜感激。
I am trying to export my records for Customers who have not ordered yet, to CSV and while running that script, my local WAMP server gets hault, and no response from my computer, even waiting for an hour.
Total customer records are 23,000 to compare with my total order records of 18,000.
do you guys have any idea, how can i easily export to CSV, diff customer information like first name, last name, email address to CSV easily at one query, without my browser/WAMP getting haulted.
Earlist reply would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你可以绕过PHP,在mysql命令行中,做
当然,你仍然使用PHP调用上面的查询(上面是干净的)
生成的csv使用制表符分隔符。
You can by-pass PHP, in mysql command line, do
Of course, you still call the above query using PHP (the above is clean-cut)
The generated csv is using tab delimiter.
我假设您的记录存储在 MYSQL 中,并且您已经用 PHP 编写了一个查询该数据库的脚本?
一次性的快速而肮脏的方法是在 mysql 客户端中执行查询。
我认为WAMP目录中应该有一个'mysql'命令(以前使用过XAMP,但它很相似?)。至少在使用这种方法时你的浏览器和 Apache 不再有任何关系了。
I'm assuming your records are stored in MYSQL, and you've written a script in PHP that queries that db?
The quickanddirty method for a one-time would be to execute your query in the mysql-client.
There should be a 'mysql' command in the WAMP dir I think (have used XAMP before, but it's similar?). At least your browser and Apache don't have anything to do with it anymore while using this method.