• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

SQL query to call users with a certain trophy title

Nudaii

Well-known member
#1
on my site we use trophy titles to decide which members should be invited into a private group, however up to now we have to search manually

how can i have a query to find all users who have x trophy title

?
 
S

Syndol

Guest
#2
Rather than searching by trophy title you could search by trophy points (as each title corresponds to a specific amount of points).
You could get a list of emails and names by using the send email form in ACP and selecting 'Only generate a list of email addresses'
Simply assign Trophy points between range to the exact number you are looking for (ie 130 to 130)

Or you could use the following SQL query:
SELECT user_id, username FROM xf_user WHERE trophy_points = 130