阅读背景:

使用PHP获取CSV文件的第一行并使用数据创建MySQL表

来源:互联网 

I am trying to take a rather large CSV file and insert it into a MySQL database for referencing in a project. I would like to use the first line of the file to create the table using proper data types and not varchar for each column. The ultimate goal is to automate this process as I have several similar files but the each has different data and a different amount of "columns" in CSV files. The problem that I am having is gettype() is returning 'string' for each column instead of int, float and string as I would like it to.I am trying to take a rather large CSV file and




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: