简体   繁体   English

我可以使用MySql CSV存储引擎来捕获php程序中的CSV吗

[英]Can I use the MySql CSV storage engine to capture the CSV in a php program

The MySQL CSV storage engine "creates a table format file in the database directory". MySQL CSV存储引擎“在数据库目录中创建表格式文件”。 Because of the nature of my application deployment I do not have access to the file system from my PHP program. 由于我的应用程序部署的性质,我无法从我的PHP程序访问文件系统。

Is there a way to use the Csv Engine to have the csv file created either as a db table or in a text or blob column of an existing table? 有没有一种方法可以使用Csv Engine在数据库表中或在现有表的text或blob列中创建csv文件?

I know that I can manually create csv entries row by row in my PHP program, however because of size and speed I'm trying to use the MySQL CSV engine. 我知道我可以在PHP程序中逐行手动创建csv条目,但是由于大小和速度原因,我试图使用MySQL CSV引擎。

The MySQL CSV engine is of no use to you here. MySQL CSV引擎在这里对您毫无用处。 (Arguably, it's of very little use to anybody.) (可以说,这对任何人都没有多大用处。)

What it does is make MySQL store table data internally as a CSV file, instead of in its typical native InnoDB (or MyISAM) format. 它的作用是使MySQL在内部将表数据存储为CSV文件,而不是以其典型的本机InnoDB(或MyISAM)格式存储。 If you do not have access to the MySQL data directory -- which you don't appear to here -- this won't do you any good. 如果您无权访问MySQL数据目录(在这里没有出现),那么这将无济于事。 All it'll do is make the table really slow, and prevent you from using indexes or NULL columns. 它所要做的就是使表真正变慢,并阻止您使用索引或NULL列。

Use PHP to generate CSV output. 使用PHP生成CSV输出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM