Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
  • Register
Welcome to the Q&A for Question2Answer.

If you have questions about the platform, click here to ask and please use English.

If you just want to try Q2A, please use the demo, which also grants admin access.

Apr 29: Q2A 1.5.2

How to show all users who like a specific ítem / category ?

0 votes
How should the function look like ?

Basically it is just accessing the table qa_userfavorites and asking for all userids where entitytype is C and entityid is = actual category id.

Then, generating from the user id the data and build a list.

In my regional site each category is a locality and when a user hits a modified "show friends" button, the list of users who have that category (locality) as favorite should show up.

I just dont know how to get there as I am no coder...

I would be fully happy just to get hands on that array, from there Ill find a way..

Any help is welcome !

What I have is something like:

$categoryfriends=qa_db_query_raw('SELECT userid FROM ^userfavorites WHERE entitytype='C' AND entityid=$actualcategory');

But this does not work and I dont know where to put it...
Q2A version: 1.5
asked Jan 21 in Q2A Core by monk333
edited Jan 21 by monk333

Please log in or register to answer this question.