H
harryos
hi
I am a beginner with web apps and databases.
i am using mysql as db for a web application(for learning purposes).It
has a table called 'equipment' which has to be populated from values
given in a text file
the table is created using an sql stmt like
create table equipment (
id varchar(256) not null,
title varchar(40) not null,
imageURL varchar(512) not null,
thumbnailURL varchar(512) not null,
shortSummary varchar(80) not null,
summary varchar(4000),
perWeek decimal(10,2) not null,
perDay decimal(10,2) not null,
type varchar(4) not null,
primary key (id)
);
The text file containing the values is like
id:000-KONRAD
title
olish Barbarian
summary:Assassin
pic:konrad.jpg
week:300.00
day:45.00
type:g_a
Born in Poland, 1978. Mentally unstable.
FSCK
id:000-TOM
title:American CS Intelligience Officer
pic:tom.jpg
summary:Too much coffee
week:300.00
day:40.00
type:g_a
<h3>Database God</h3>
FSCK
....
....
there are about 100 such sets(beginning with id and ending with the
FSCK string.How do i use this text file to insert values into the
table?
thanks
harry
I am a beginner with web apps and databases.
i am using mysql as db for a web application(for learning purposes).It
has a table called 'equipment' which has to be populated from values
given in a text file
the table is created using an sql stmt like
create table equipment (
id varchar(256) not null,
title varchar(40) not null,
imageURL varchar(512) not null,
thumbnailURL varchar(512) not null,
shortSummary varchar(80) not null,
summary varchar(4000),
perWeek decimal(10,2) not null,
perDay decimal(10,2) not null,
type varchar(4) not null,
primary key (id)
);
The text file containing the values is like
id:000-KONRAD
title
summary:Assassin
pic:konrad.jpg
week:300.00
day:45.00
type:g_a
Born in Poland, 1978. Mentally unstable.
FSCK
id:000-TOM
title:American CS Intelligience Officer
pic:tom.jpg
summary:Too much coffee
week:300.00
day:40.00
type:g_a
<h3>Database God</h3>
FSCK
....
....
there are about 100 such sets(beginning with id and ending with the
FSCK string.How do i use this text file to insert values into the
table?
thanks
harry