SQL for user list of Rejected users

3 months 2 days ago #336851 by wintercorn
SQL for user list of Rejected users was created by wintercorn
I'm trying to use the lists to show users who have been rejected. There isn't a field for this so it's sql only. I can't seem to get this right though.

My query from the site db:

SELECT *
FROM `j1111_comprofiler`
WHERE `approved` LIKE '2'
LIMIT 50

How can I translate this into CB speak? Thanks
 

Please Log in to join the conversation.

3 months 2 days ago #336855 by krileon
Replied by krileon on topic SQL for user list of Rejected users
It probably would be easier to use a userlist for that. The below should work.

Filters
Advanced
ue.`approved` = 2
Parameters > Display
Show Blocked: Yes
Show Unapproved: Yes
Show Unconfirmed: Yes

Note this will only work if you're viewing the userlist as a moderator.

As for your question regarding CB Query Field you'd use the below to loop and display query data for example.

Query
SELECT *
 FROM `jos_comprofiler` AS cb
 INNER JOIN `jos_users` AS u
 ON u.`id` = cb.`id`
 WHERE cb.`approved` = 2
 LIMIT 50
Display
Output: Multiple Rows
Columns: Multiple Columns
Row:
<div>[column_username] - [column_email]</div>

This for example should show rejected users username and email in a div per user.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.397 seconds

Facebook Twitter LinkedIn