WEB Append to MySQL record

Discussion in 'OT Technology' started by hurleyint1386, Oct 30, 2007.

  1. hurleyint1386

    hurleyint1386 Someone has sand in their vagina

    Joined:
    Jan 6, 2005
    Messages:
    3,687
    Likes Received:
    0
    Location:
    Rochester, NY
    I've got a MySQL table with a column "story" and I want users to be able to append to that entry, does anyone have any idea as to how I can append to it? I could probably copy that data to a variable then overwrite it, so I'll do that if I can't just append. Thanks
     
  2. hurleyint1386

    hurleyint1386 Someone has sand in their vagina

    Joined:
    Jan 6, 2005
    Messages:
    3,687
    Likes Received:
    0
    Location:
    Rochester, NY
    I just found something, it says it's for postgresql, but many sql syntax is tha same. I'll test this out:

    update table1 set values = values || 'newtext' where id = 1
     
  3. RaginBajin

    RaginBajin Have you punched a donkey today?

    Joined:
    Dec 24, 2001
    Messages:
    8,740
    Likes Received:
    0
    Location:
    NoVA
    update table set column = CONCAT($newValue,column) where id = 2;

    That should work just fine by you.
     

Share This Page