$10 for a minute answer!

curiosity

Junior Member
Joined
Oct 19, 2009
Messages
104
Reaction score
10
I'm going to pay you $10 to give me a solution to this question:

How do I mass insert values into a SQL field, instead of doing it one at a time?

(in PHPMyAdmin --> Database --> Table --> Insert)
 

risefromdeath

BANNED
Joined
Jul 1, 2009
Messages
652
Reaction score
107
there are many many ways
for example write a sql in this format

PHP:
INSERT INTO `keywords` (`slno`, `keyword`) VALUES
(1, 'test'),
(2, 'test1');

else use the import fucntion to import it from excel or other support formats like csv..just see which suits you most :)
 

cottontail

BANNED
Joined
Oct 27, 2009
Messages
114
Reaction score
4
I have an idea!!!Paste your sample data here...There's a lot of sloution to it. You can use the built in "SQL" and paste your sql codes and click "Go"
 

Kosher1

Senior Member
Joined
Oct 22, 2009
Messages
834
Reaction score
421
Not nice, they should add him to the shitlist if he dont pay
 

curiosity

Junior Member
Joined
Oct 19, 2009
Messages
104
Reaction score
10
Whah, relax guys. I'm not a scum bag. I just sent you a PM risefromdeath.
 

curiosity

Junior Member
Joined
Oct 19, 2009
Messages
104
Reaction score
10
there are many many ways
for example write a sql in this format

PHP:
INSERT INTO `keywords` (`slno`, `keyword`) VALUES
(1, 'test'),
(2, 'test1');
else use the import fucntion to import it from excel or other support formats like csv..just see which suits you most :)


If you don't mind me asking further, how do I use the import function to import data from excel? How would I format the excel file?
 

justone

BANNED
Joined
Oct 12, 2008
Messages
1,521
Reaction score
1,054
Code:
LOAD DATA INFILE 'exceldata.csv' INTO TABLE tablename
FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\'
LINES TERMINATED BY '\r\n'

That code will load the file "exceldata.csv"
The file is CSV format, fields are separated by , and enclosed by "
One line is one entry

You can make excel export in that format (csv export), or adapt the sql query to match your excel export.

Play around you'll solve it now
 
Top