By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,988 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,988 IT Pros & Developers. It's quick & easy.

Importing multiple files

P: n/a
Hi,
I have to import hundreds of file to MySQL database. Is it
possible to write a script/storedprocedure in MySQL that does this
without manually doing it for each file.
Say file names are of type 'file0001.txt', 'file0002.txt' etc. Does
MySQL provide any such utility or does anyone know of a free utility?.
If not then what is best language to write such a script/program. Cant
such a script be written in PHP easily?

Thx.
Dec 9 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
NC
On Dec 8, 9:53 pm, myGoogle71 <ali...@sunnipath.comwrote:
>
I have to import hundreds of file to MySQL database.
....
Say file names are of type 'file0001.txt', 'file0002.txt' etc.
....
Cant such a script be written in PHP easily?
Yes.

Cheers,
NC
Dec 9 '07 #2

P: n/a
On Sun, 09 Dec 2007 06:53:29 +0100, myGoogle71 <al****@sunnipath.com>
wrote:
Hi,
I have to import hundreds of file to MySQL database. Is it
possible to write a script/storedprocedure in MySQL that does this
without manually doing it for each file.
Say file names are of type 'file0001.txt', 'file0002.txt' etc. Does
MySQL provide any such utility or does anyone know of a free utility?.
If not then what is best language to write such a script/program. Cant
such a script be written in PHP easily?
Easily written. Check the glob() function in PHP & de LOAD_FILE() function
in MySQL.
--
Rik Wasmus
Dec 9 '07 #3

P: n/a
myGoogle71 wrote:
Hi,
I have to import hundreds of file to MySQL database. Is it
possible to write a script/storedprocedure in MySQL that does this
without manually doing it for each file.
Say file names are of type 'file0001.txt', 'file0002.txt' etc. Does
MySQL provide any such utility or does anyone know of a free utility?.
If not then what is best language to write such a script/program. Cant
such a script be written in PHP easily?

Thx.
As Rik indicated, this is very easily done in PHP. But if you're
looking how to do it in MySQL, you're in the wrong group - you want
comp.databases.mysql.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Dec 9 '07 #4

P: n/a
Jerry Stuckle wrote:
myGoogle71 wrote:
>Hi,
I have to import hundreds of file to MySQL database. Is it
possible to write a script/storedprocedure in MySQL that does this
without manually doing it for each file.
Say file names are of type 'file0001.txt', 'file0002.txt' etc. Does
MySQL provide any such utility or does anyone know of a free utility?.
If not then what is best language to write such a script/program. Cant
such a script be written in PHP easily?

Thx.

As Rik indicated, this is very easily done in PHP. But if you're
looking how to do it in MySQL, you're in the wrong group - you want
comp.databases.mysql.
Oops - I didn't look for a crosspost :-(. My bad.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Dec 9 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.