|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Importing TXT file into MYSQL table
Hi all,
Nice place to be. I am a newbie who is just doing simple stuff with php/mysql. I wanted to know how to import a txt file(comma separated) into a mysql table. Do we have any utility that might do this??? I would really appreciate your HELP?? Thanks a lot. Cheers!!! |
|
#2
|
|||
|
|||
|
RE: Importing TXT file into MYSQL table
Welcome jeyam,
You can use mysqlimport to import your file. (consult the mysql manual for syntax) this would be the easiest way to import a text file into mysql. If you have any questions after consulting the manual, let me know. |
|
#3
|
|||
|
|||
|
RE: Importing TXT file into MYSQL table
You can also do it in phpmyadmin
|
|
#4
|
|||
|
|||
|
RE: Importing TXT file into MYSQL table
Thanks guys, I found the info. But I wanted to do this in a site hosted by a webhosting company where I don't have access to a prompt to run the commands. Can u guys let me know if it is doable. Thanks for your prompt Reply. |
|
#5
|
|||
|
|||
|
RE: Importing TXT file into MYSQL table
Yes you can. As postalcow stated you can use PHPMyAdmin which can be downloaded from http://www.phpmyadmin.net
It has all the documentation you need for the installation. Before installing check whether your site already has PHPMyAdmin installed. Because most of them do. If you have a control panel for your website like CPANEL or PLESK it might contain a link for PHPMyAdmin. Or ask your hosting company for the info. |
|
#6
|
|||
|
|||
|
RE: Importing TXT file into MYSQL table
Hi Jeyam
I had problems in doing this too. As they said above phpmyadmin is the way to do it if you can... but if you can't (or want to do this yourself in php) then have a look at the LOAD DATA statement in this page of the mysql manual. http://www.mysql.com/doc/en/LOAD_DATA.html I hope this helps. Pryce |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Importing TXT file into MYSQL table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|