Skip to:
Content
Pages
Categories
Search
Top
Bottom

Retrieving parent comment id via sql returns blank?


  • King Ding
    Participant

    @dazzerr

    In this function, I want item_id => 'A NUMBER'. That number can be found on the corresponding table row retrieved from my database. I have tested the sql and it retrieves the intended values, but in the context of this function, it gives a blank value?

    https://pastebin.com/4qg11phZ

    My apologies if there’s a lot of information that’s unnecessary here, but I thought that it may give some context into what’s happening and what I want to achieve.

    So my core question is, why is the intended item_id not recording the intended data?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

  • King Ding
    Participant

    @dazzerr

    After some tests, it seems that $parent_comment->comment_content in the sql line is the issue. This is me trying to retrieve a number (id) from the table: bp_activity IF the parent comment (recorded in the table comments > comment_content) has the same content as an entry recorded in bp_activity. Perhaps there’s a better way to be doing this ? 🤔


    King Ding
    Participant

    @dazzerr

    Sorry to triple post, but there’s no way I can edit my post. I have discovered that I simply forgot to surround {$parent_comment->comment_content} with ”. However, I welcome your opinions on better alternatives to me query!


    thelanj
    Participant

    @thelanj

    Hey man, did you get this sync working? Please let me know if you did, I need the same thing!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar