Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Display group or event ID in profile

  • mjplowcha
  • mjplowcha
  • OFFLINE
  • Posts: 30
  • Thanks: 1
  • Karma: 0
11 years 8 months ago #220451 by mjplowcha
Display group or event ID in profile was created by mjplowcha
I would like to be able to display a persons group ID and / or their event ID (while active) into their profile view, but I am not sure where to get started on this. Can someone please point me in the right direction to get me started?

Please Log in or Create an account to join the conversation.

  • mjplowcha
  • mjplowcha
  • OFFLINE
  • Posts: 30
  • Thanks: 1
  • Karma: 0
11 years 8 months ago - 11 years 8 months ago #220460 by mjplowcha
Replied by mjplowcha on topic Display group or event ID in profile
Okay, I discovered the Query option. Very cool feature, but I can't seem to pull multiple data sets and I can't tell if I am pulling the data only for the logged in user and not just what is first in the list.
Code:
SELECT id, user_id, date FROM xxx_groupjive_plugin_events

Results produce "1, 123, 2013-02-02..."

I have this user registered to multiple events, if I add in the code WHERE user_id = 123 to the query, then what is the secret to pulling the logged in users id ='s the events user_id to match for the query?


Suggestions? Tutorials for the query field anywhere?
Last edit: 11 years 8 months ago by mjplowcha.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48456
  • Thanks: 8280
  • Karma: 1443
11 years 8 months ago #220480 by krileon
Replied by krileon on topic Display group or event ID in profile
You're pulling every single event in GJ. If you need multiple rows you need to set the Output to Multiple Rows. Query example as follows.
Code:
SELECT * FROM `#__groupjive_plugin_events` WHERE `user_id` = '[user_id]' AND `published` = 1

You can then use the above like the following in Multiple Rows display.

[column_id] - [column_title] - [column_date]

Tutorials for the query field anywhere?

Nope, it's just a textarea where you supply an SQL statement. Nothing to provide a tutorial for. Suggest reviewing the below SQL tutorials if new to SQL though to get you familiar with various SQL functions and usages.

www.w3schools.com/sql/sql_quickref.asp


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.
The following user(s) said Thank You: mjplowcha

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum