SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Aug 2004
    Location
    Swindon
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Select and concatenate string

    Hello all

    This may seem like a daft thing to do, but it does have a reason, (cfm cffeed)

    I need to select an id from my db and then add a string to the start of it... kind of like....

    Code:
    select name, title,
    'http://www.myurl.com/thepage.cfm?id='+id as mylink
    though that doesnt work soi i assume my syntax is wrong


    ps. I have tried google but its tricky finding the right search terms

    pps sorry this should be in mysql

  2. #2
    SitePoint Guru
    Join Date
    Jan 2004
    Location
    Uppsala, sverige
    Posts
    695
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    In Mysql:

    Code:
    concat('http://www.myurl.com/thepage.cfm?id=',id)


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
  •