469,643 Members | 2,036 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,643 developers. It's quick & easy.

Import a directory of text files into a mysql database with php?

Hi everyone...

I know this isn't strictly a php/mysql ng, but I was hoping maybe
someone here knows both languages and is willing to help.

I have a directory of text files that i'd like to import into a msql
table... I was wondering if there's an easier way to do this with
php/mysql, I'd like to avoid copy/pasting the entire directory
(thousands of files) into the database if i can.

The directory structure of the text files resembles...

somepath/A/Aerosmith/Song Name.txt - (extention varies)

What i'd like to do is use php to scan the directory and input
the file path information and the content from each file into a table
like...
Dir Artist Song Text Type
------------------------------------------------------------------------
A Aerosmith Song Name Fa La La La La (example text) File Ext
B Beatles Song Name Fa La La La La (example text) File Ext
I'm fairly new to php/mysql so if you can offer up any ideas, even
just a finger in the right direction - it'd be greatly appreciated.

Thanks,

Don Bedford.
Jul 20 '05 #1
0 1873

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Michel Feldheim | last post: by
11 posts views Thread by Bruce A. Julseth | last post: by
8 posts views Thread by Jamie Meyers | last post: by
3 posts views Thread by John Kolvereid | last post: by
4 posts views Thread by news | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.