pimax
07-27-2003, 10:30 AM
hi everyone
please need help running phpmyadmin on IIS 5 win xp prof
the database is already created how can i load data on my data base using mysql syntax on phpmyadmin with the function load data infile it's impossible to load .txt data file
thanks
KarterJK
08-02-2003, 11:25 PM
create either a text file or sql file
eample.txt or example.sql
and use this as a template for setting up your table and data
###First your text file must tell phpmyadmin to create the table
CREATE TABLE ALLTOURNEY_players (
id int(11) unsigned NOT NULL auto_increment,
name text NOT NULL,
email text NOT NULL,
passwd text NOT NULL,
type smallint(3) unsigned NOT NULL default '0',
j_date date NOT NULL default '0000-00-00',
active char(1) NOT NULL default 'N',
ip text,
PRIMARY KEY (id)
) TYPE=MyISAM;
### then your txt or sql file must tell phpmyadmin what to do
INSERT INTO ALLTOURNEY_players VALUES (1, 'ganon1', 'jp_junk@hotmail.com', 'ganon1', 0, '0000-00-00', 'Y', NULL);
INSERT INTO ALLTOURNEY_players VALUES (2, 'ganon2', 'jp_junk@hotmail.com', 'ganon2', 0, '0000-00-00', 'Y', NULL);
INSERT INTO ALLTOURNEY_players VALUES (3, 'ganon3', 'jp_junk@hotmail.com', 'ganon3', 0, '0000-00-00', 'Y', NULL);
INSERT INTO ALLTOURNEY_players VALUES (4, 'ganon4', 'jp_junk@hotmail.com', 'ganon4', 0, '0000-00-00', 'Y', NULL);
INSERT INTO ALLTOURNEY_players VALUES (5, 'ganon5', 'jp_junk@hotmail.com', 'ganon5', 0, '0000-00-00', 'Y', NULL)
### and thats it
so in recap
1. create your .txt or .sql file in the above fashion (leave out the comments ###)
2. use phpmyadmin to create the name of the database
3. Once the database name is created use the import function
4. and just name your .txt or sql file and it will create tje table and then insert the information.
Took me a long time to understand how it worked
KarterJK
08-02-2003, 11:27 PM
oh and in the future you can just add to the file by just using the insert portion of the script only
pimax
08-03-2003, 11:38 AM
thanks for your help
but i'm talking about 5000 position and more than 25000 different data the load data statement do it well and its impossible to add 25000... how can I insert a group of data with tab separated fields