SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot NevadaSam's Avatar
    Join Date
    May 2006
    Location
    Georgia
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Append text to a field

    I want to learn how to append more text to a field in a table using mysql and php. I thought concat() might be the answer, but I can't understand it.

    So her is what I want to do. Say in table `stuff`, in field `talk` is the data 'Hi'
    I want to append " Mom" so 'Hi Mom' will be stored in that field. But I don't want to use UPDATE to do this.

    What are my options.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,022
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by NevadaSam View Post
    But I don't want to use UPDATE to do this.

    What are my options.
    do the CONCAT every time you SELECT the data

    that's the entire list of your options

    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


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
  •