473,387 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Populating MySQL table with text file using myPHPadmin

Greetings.

I'm somewhat new to this whole MySQL/PHP thing and need a little help.

My web hosting service uses phpMyAdmin and at the bottom of the screen
iis an area where I can upload a text file to populate a table.

I have a table named groups with two fields:
groups_id auto-increment primary
groups_name

So how do I create my text file to populate this table?

I'm going to use MS Notepad.

If it's set to auto-increment, do I need to include the number? If
so, does it start at 0 (zero)?

Would the file look like:

0,students
1,faculty
2, staff

or just

students
faculty
staff

(though I can't image that working).

Any help is appreciated.

Thanks.

Ward
Aug 6 '05 #1
1 3099
The format of that file must be in the same format as is written out by the
EXPORT function. Put some data into a table, do an export, then see what it
looks like.

The idea behind this is so that you can export data from one database and
import into another using the same file. I do it all the time. so I know it
works.

--
Tony Marston

http://www.tonymarston.net

"Ward B" <Wa*******@hotmail.com> wrote in message
news:79********************************@4ax.com...
Greetings.

I'm somewhat new to this whole MySQL/PHP thing and need a little help.

My web hosting service uses phpMyAdmin and at the bottom of the screen
iis an area where I can upload a text file to populate a table.

I have a table named groups with two fields:
groups_id auto-increment primary
groups_name

So how do I create my text file to populate this table?

I'm going to use MS Notepad.

If it's set to auto-increment, do I need to include the number? If
so, does it start at 0 (zero)?

Would the file look like:

0,students
1,faculty
2, staff

or just

students
faculty
staff

(though I can't image that working).

Any help is appreciated.

Thanks.

Ward

Aug 7 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest...
4
by: Adam Smith | last post by:
I have a dedicated server running 'FreeBSD 4.9 STABLE' at a hosting site. They have done some default installations, presumably from the CVS ports package ??. Herein lies the problem, "I do not...
7
by: Drew | last post by:
I have a db table like the following, UID, int auto-increment RegNo Person Relation YearsKnown Now here is some sample data from this table,
2
by: Jamie | last post by:
Hi there, I'm not sure if SQL is capable of this so I would like your ideas and comments. I have over a thousand text files with in the below format. ComputerName=computerHostName...
4
by: news | last post by:
Our production database in an exported textfil runs about 60 MB. Compressed that's about 9 MB. I'm trying to import the export into another machine running FC3 and mySQL 11.18, and it appears as...
6
by: AP | last post by:
I have not seen any good examples on how to connect to a mySQL db. My website uses phpMyAdmin to administer the SQL databases. What confuses me is where are the databases that I create located? For...
4
by: prosad | last post by:
hello, Just solved a problem using Javascript onclick, can click on any cell in a dynamic table and it will pass the innerText object value to my form text field. parts of code given below: ...
2
by: eclipsme | last post by:
I have a delimited text file I need to get into a MySQL table. My main problem is the date field. It is in the format of 10/28/2008. The table needs 2008-10-28. My first thought was to build an...
14
anfetienne
by: anfetienne | last post by:
hi this question is linked to this post ive made in the mysql section. http://bytes.com/topic/mysql/answers/871536-populating-table#post3499253 simply i want to use a form to populate a table...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.