SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    May 2013
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    search in comments an replies

    id uid text date
    1 1 test 1 str time
    2 1 text2 time
    3 10 text3 time
    4 8 text4 time
    5 13 text 5 str time
    6 23 text6
    7 23 text7 str


    id comment_id comment_parent_id
    1 2 1
    2 3 1
    3 5 4
    4 6 4
    5 11 4

    i want to retrieve the COMMENTS ONLY that have 'str' in text column or any one of replies that have 'str' string

    result here should be

    id uid text date
    1 1 test 1 str time
    4 8 text4 time
    7 23 text7 str

    (here we return this comment id = 4 because one of the his replies has 'str')

    thank you

  2. #2
    SitePoint Member
    Join Date
    May 2013
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i know it should be one table , but really i cant change it now , please guys i need your help


Tags for this Thread

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
  •