vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |
| |||
| On Dec 8, 9:53 pm, myGoogle71 <ali...@sunnipath.com> wrote: > > 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 |
| |||
| On Sun, 09 Dec 2007 06:53:29 +0100, myGoogle71 <ali711@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 |
| |||
| 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. jstucklex@attglobal.net ================== |
| ||||
| 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. jstucklex@attglobal.net ================== |