I have a bunch of data in a text file that looks like this:
file.txt
Name.n12d74.text.text
Name.n16d99.text.text
Name.n87d16.text.text
and my mysql table looks like this:
id int(11) NOT NULL AUTO_INCREMENT,
random varchar(50) DEFAULT NULL,
data int(11) DEFAULT NULL,
`number` varchar(250) DEFAULT NULL,
fullname varchar(500) DEFAULT NULL,
PRIMARY KEY (testable) ENGINE=MyISAM DEFAULT CHARSET=latin1
Example data:
id | data | random | number | fullname
-----|------|-----------|--------|----------
1 | 5 | xjiogj | n12d74 | Name.n12d74.text.text
2 | 5 | jfoisjf9s | n16d99 | Name.n16d99.text.text
3 | 5 | zjiwej | n87d16 | Name.n87d16.text.text
id: is always the previous one +1
random: is just random lower case letters and numbers
number: is taken from the .txt file lines
fullname: is just a copy paste of the full line from the .txt file
I am trying to insert it into MySQL, i can do it through the terminal (ssh) or phpmyadmin.
I am very new mysql so appreciate any help.