data from txt files to mysql database

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
alxkn
Forum Newbie
Posts: 14
Joined: Sat May 20, 2006 5:14 pm

data from txt files to mysql database

Post by alxkn »

Hello,

I have data in excel and txt files. I want to put those data in mysql database. I know that I can create an appropriate table in a database and use insert command. However, there are a lot of rows, so this method is time consuming. Could you please let me know if there is a way to ask database to fill table rows from files?

Thank you in advance.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

phpMyAdmin can do it. It can import from Excel format as well as text file (CSV, Tab-delimited, etc).
alxkn
Forum Newbie
Posts: 14
Joined: Sat May 20, 2006 5:14 pm

Post by alxkn »

Thanks. actually I wanted to develop the project locally, before putting it in server. Is there a way using phpmyadmin locally?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Absolutely. Download it and unzip it to a folder within your local server. This assumes that you have a local web server installed on your system. If not, you will need one as phpMyAdmin is a PHP application (which requires a web server).
alxkn
Forum Newbie
Posts: 14
Joined: Sat May 20, 2006 5:14 pm

Post by alxkn »

Thanks again. I have php5, apache 2 and mysql5 installed in my computer. I am dowloading now phpmyadmin 2.8.1. You wrote "unzip it to a folder within your local server". What does that exactly mean. Should I put it in a specific folder in apache directories?

Thanks in advance.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

There is a path in your system that is the root of your server. On windows it is something like c:\Program Files\Apache Group\Apache\htdocs. Unzip PMA to that folder and follow their readme instructions on how to get it to run. Post back if you have any problems.
Post Reply