Originally posted by rakennedy75
I need to figure out a way to dynamically add a tab delimited file to MySQL using PHP.
When you say "add" a tab delimited file to MySQL, do you mean you want to INSERT the actual file into the db, the path to the file, or do you want to read from the file and insert the contents (which is my guess from the fact that you mentioned that it is tab delimited).
Bastien has already addressed your question if you wish to upload and insert the actual file. If you meant to insert the actual contents, skip the process of using PHP for doing this as it would be simpler to work with the MySQL syntax LOAD DATA INFILE.
You will have to run this from the shell, so if you have SSH access to your db, this will be the best way. It is fast and no extra coding in PHP is necessary unless you need to do actuall build a web interface. The MySQL manual has details:
http://dev.mysql.com/doc/mysql/en/LOAD_DATA.html