Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Which SQL query for first name, last name, phone number?

  • WoodyF4u
  • WoodyF4u
  • OFFLINE
  • Posts: 18
  • Thanks: 3
  • Karma: 0
2 years 5 months ago #329805 by WoodyF4u
I would like to retrieve the user information such as first name, last name, phone number from Community Builder database tables.
I made a form with Balbooa Forms.
In it I can have fields automatically filled with a SQL query.

I understand the query to select a user by ID, but I would like to retrieve the data from the currently logged in user.

Who can help me with the correct SQL query?

Best regards,
Wouter
The Netherlands

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
2 years 5 months ago #329818 by krileon
Core CB fields and custom CB fields are all stored in the _comprofiler table. You'll find that information there. For core Joomla fields you'll find that information in _users. I cannot help you with custom coding, sorry. Suggest reviewing those tables carefully and trying queries in phpmyadmin.


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 or Create an account to join the conversation.

  • WoodyF4u
  • WoodyF4u
  • OFFLINE
  • Posts: 18
  • Thanks: 3
  • Karma: 0
2 years 5 months ago #329822 by WoodyF4u
Thank you for your response.
In comprofiler I see all the data of all users.
But I can't find a value there that indicates that it is the specific logged in user.

Suppose I want to display the first name of the logged in user in a form field.
Where could I find it?

Best regards,
Wouter
The Netherlands

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
2 years 5 months ago #329833 by krileon
Login status is entirely contained in Joomla's sessions. Those are stored in the _sessions table. If they have a row in that table matching their userid they're logged in.


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum