1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

$10 for a minute answer!

Discussion in 'Hire a Freelancer' started by curiosity, Nov 18, 2009.

  1. curiosity

    curiosity Junior Member

    Joined:
    Oct 19, 2009
    Messages:
    104
    Likes Received:
    10
    Occupation:
    Student
    Location:
    Canada
    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)
     
  2. risefromdeath

    risefromdeath BANNED BANNED

    Joined:
    Jul 1, 2009
    Messages:
    652
    Likes Received:
    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 :)
     
  3. cottontail

    cottontail BANNED BANNED

    Joined:
    Oct 27, 2009
    Messages:
    114
    Likes Received:
    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"
     
  4. risefromdeath

    risefromdeath BANNED BANNED

    Joined:
    Jul 1, 2009
    Messages:
    652
    Likes Received:
    107
    i doubt he is coming online again :p
     
  5. Kosher1

    Kosher1 Power Member

    Joined:
    Oct 22, 2009
    Messages:
    766
    Likes Received:
    395
    Not nice, they should add him to the shitlist if he dont pay
     
  6. curiosity

    curiosity Junior Member

    Joined:
    Oct 19, 2009
    Messages:
    104
    Likes Received:
    10
    Occupation:
    Student
    Location:
    Canada
    Whah, relax guys. I'm not a scum bag. I just sent you a PM risefromdeath.
     
  7. curiosity

    curiosity Junior Member

    Joined:
    Oct 19, 2009
    Messages:
    104
    Likes Received:
    10
    Occupation:
    Student
    Location:
    Canada

    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?
     
  8. justone

    justone Elite Member

    Joined:
    Oct 12, 2008
    Messages:
    1,521
    Likes Received:
    1,037
    Occupation:
    -
    Location:
    Europe
    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