itslogical
Technical User
hi i could use some help with this problem i have..
im making a database of artist with songtitle but the info i have to ad is a lot.
I know for the expert its very easy but for me with absolutely no knowledge of this is abracadabra...
Okay some info.......
the lists i have is all build like this......
Let No Man Put Asunder - First Choice
Primitive Desire - Eastbound Express Way
So songtitle ...then artist.
This is the table at this moment.. ....
CREATE TABLE `hits` (
`id` int(11) NOT NULL auto_increment,
`titel` varchar(250) NOT NULL default '',
`artiest` varchar(250) NOT NULL default '',
`label` varchar(150) NOT NULL default '',
`hp` smallint(6) NOT NULL default '0',
`aw` smallint(6) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=74 ;
and the page i created to ad the stuff 1 by 1 is like this....
echo"<form action=\"toevoegen.php\" method=\"post\">"
. "Artist:<input type=\"text\" name=\"artiest\" size=\"20\" maxlength=\"30\"><br>"
. "Titel:<input type=\"text\" name=\"titel\" size=\"30\"><br>"
. "Mixnaam:<input type=\"text\" name=\"label\" size=\"30\"><br>"
. "Hoogste positie:<input type=\"text\" name=\"hp\" size=\"30\"><br>"
. "Aw:<input type=\"text\" name=\"aw\" size=\"30\"><br>"
. "<input type=\"submit\" name=\"submit\" value=\"toevoegen\"></form>";
if($submit) {
mysql_connect("localhost","xxxxxxxx","xxxxxxx");
mysql_select_db("xxxxxxxxx");
$insert = "INSERT INTO hits (id,titel,artiest,label,hp,aw)
VALUES ('$id','$titel','$artiest','$label','$hp','$aw')";
$query = mysql_query($insert)or die(mysql_error());
}
but it will take me probably 30 years to do it like this.
so a friend said something like....LOAD DATA INFILE
i would call it a dump file or whatever...
so my question would be....
can someone create this "LOAD DATA INFILE" for me please ?
and if possible complete....?
So i only have to add the lines of artist and songtitle ....
and what i need to do to execute the file....(so the info gets added......
Thanks for any help...
im making a database of artist with songtitle but the info i have to ad is a lot.
I know for the expert its very easy but for me with absolutely no knowledge of this is abracadabra...
Okay some info.......
the lists i have is all build like this......
Let No Man Put Asunder - First Choice
Primitive Desire - Eastbound Express Way
So songtitle ...then artist.
This is the table at this moment.. ....
CREATE TABLE `hits` (
`id` int(11) NOT NULL auto_increment,
`titel` varchar(250) NOT NULL default '',
`artiest` varchar(250) NOT NULL default '',
`label` varchar(150) NOT NULL default '',
`hp` smallint(6) NOT NULL default '0',
`aw` smallint(6) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=74 ;
and the page i created to ad the stuff 1 by 1 is like this....
echo"<form action=\"toevoegen.php\" method=\"post\">"
. "Artist:<input type=\"text\" name=\"artiest\" size=\"20\" maxlength=\"30\"><br>"
. "Titel:<input type=\"text\" name=\"titel\" size=\"30\"><br>"
. "Mixnaam:<input type=\"text\" name=\"label\" size=\"30\"><br>"
. "Hoogste positie:<input type=\"text\" name=\"hp\" size=\"30\"><br>"
. "Aw:<input type=\"text\" name=\"aw\" size=\"30\"><br>"
. "<input type=\"submit\" name=\"submit\" value=\"toevoegen\"></form>";
if($submit) {
mysql_connect("localhost","xxxxxxxx","xxxxxxx");
mysql_select_db("xxxxxxxxx");
$insert = "INSERT INTO hits (id,titel,artiest,label,hp,aw)
VALUES ('$id','$titel','$artiest','$label','$hp','$aw')";
$query = mysql_query($insert)or die(mysql_error());
}
but it will take me probably 30 years to do it like this.
so a friend said something like....LOAD DATA INFILE
i would call it a dump file or whatever...
so my question would be....
can someone create this "LOAD DATA INFILE" for me please ?
and if possible complete....?
So i only have to add the lines of artist and songtitle ....
and what i need to do to execute the file....(so the info gets added......
Thanks for any help...