HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to get how many times user commented on a discussion?

How do I get how many times a user has commented on a discussion?

Comments

  • How can I do this?

  • KryptixKryptix Ypres
    edited October 2017

    Using the sql builder,

    You create a query that selects the discussionid in discussion and comments table, insertuserid (or the equivalent) from comments and compare (where clause) it with the userid of the poster. Then do NumRows();

  • poinspoins New
    edited October 2017

    @Kryptix , would I be able to do it with $this->?

  • @Kryptix , could you provide the code for this?

  • R_JR_J Ex-Fanboy Munich Admin

    @Bilbo Beutlin said:
    What have I got in my pocket?

  • KryptixKryptix Ypres

    @poins zei:
    @Kryptix , could you provide the code for this?

    Trial and error my friend :awesome: if it doesnt work, try again. That's how you get skills

  • poinspoins New
    edited October 2017

    @Kryptix and @R_J , can I do it with $this? It’s not working for me and I’m trying $this->User-UserID->data(“Comments”->numRows(). Not working @R_J.

  • R_JR_J Ex-Fanboy Munich Admin

    Please stop that massive mentioning. You have been banned and warned because of that before.

    Your question alone proves that you never ever even tried to find out anything about programming. The reason why I'm not willing to help is that you are not willing or able to learn.

  • @R_J , I tried to do $this->User-UserID-data(“Comments”->numRows(). It’s not working. Can you please assist me to debug it?

  • KryptixKryptix Ypres

    https://docs.vanillaforums.com/developer/framework/database/

    Plz stop mentioning us, I had to learn it aswell. Try basic things and go from there

  • R_JR_J Ex-Fanboy Munich Admin

    Next mentioning me or Kryptix in this context will result in your next ban, aarong

    But here's a deal: read this and put your question in a way that it is answerable. One reason why you are not getting answers is that what you are asking sounds like a joke (a good one, I have to admit)

  • poinspoins New
    edited October 2017

    @R_J , would $this work? Should I do select instead?

This discussion has been closed.