shacker commented on a Page, CSV to mySQL - Create Table and Insert Data  -  Oct 27, 2014

The issue I hit with this script is that it assumes all data in your CSV will fit into a varchar field, limited to 255 characters. But some of my data needs to go into TEXT fields with unlimited length. Unfortunately there's no way for the script to know in advance what kinds of fields to create in the db. And because the final line of the script, which does the loading, does not report errors, it fails silently (very mysterious).

Hawkee  -  Oct 27, 2014

Yes, this is a very simple script. You can modify it to create each field as a text field then go back later and adjust the smaller fields to be varchars.

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.