The DB import tool |
This script lets you upload and import a tab separated text file into an SQL database. It's so easy to use! You may download it here. The script takes a table name on the first line, then a list of fields (tab delimited) on the second. Each following line has a record (tab delimited) on it. A blank line will reset, and the script will again look for a line with a table name on it, then a line with a field list on it. The script makes a web page that shows you what kind of import you're going to get before it actually does anything. A word of caution, though: The script is currently set up to erase all data before importing! That works great when the data is being maintained offline and uploaded periodically. For other situations you'd want to make an easy code modification to change this. Integer or unquoted fields must be named with an i_ at their start in order for the script to format the SQL correctly. This may make the script hard to use in many existing setups. More recent code I have queries meta data from the DB, but I haven't organized that code so that you can download it yet. Back to Code Page |