SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Nov 2001
    Location
    Fort Lauderdale
    Posts
    814
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Inserting data into a column wit multiple values.

    I have a table called "info"
    and a column called "keywords"


    my only problem is i want to insert data into keywords without having to do the same query over and over again.

    PHP Code:
    INSERT INTO info SET  
    keywords 
    "yo",

    Is there anyway to do that without havign to type da same colde over and over??

    thank you.

  2. #2
    SitePoint Guru
    Join Date
    Nov 2001
    Location
    Fort Lauderdale
    Posts
    814
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry i forgot about the mysql forum.

    Can a moderator switch this to the mysql forum??

    thank you.

  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,350
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    do you mean insert or update?

    an update statement can update many rows at once

    an insert statement can insert only one row at a time, even though mysql offers the non-standard sql option of specifying multiple rows in one insert statement

    rudy

  4. #4
    ********* Addict DLG_1's Avatar
    Join Date
    Jun 2000
    Location
    Texas, USA
    Posts
    597
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    insert into
    users values (
    select keywords
    from keywordTable
    )


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •