$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)
 
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 :)
 
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"
 
Not nice, they should add him to the shitlist if he dont pay
 
Whah, relax guys. I'm not a scum bag. I just sent you a PM risefromdeath.
 
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?
 
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
 
Back
Top