Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

Trouble about to get results

  • thiagocs
  • thiagocs
  • OFFLINE
  • Posts: 32
  • Thanks: 1
  • Karma: 0
12 years 2 months ago - 12 years 2 months ago #213092 by thiagocs
Trouble about to get results was created by thiagocs
Hi

Well, i have this code to get the users in my DB. My programmer is on vacation and would like to know if anyone can help me get the result table X in other registration program.
Code:
//<code> $items = "|Please Select\n"; $db =&JFactory::getDBO(); $db->setQuery("SELECT DISTINCT(users) FROM #__users"); $result = $db->loadResultArray(); for($i=0;$i< count($result);$i++) { $items .= $result[$i].'|'.$result[$i]; if($i<count($result)-1){ $items .= "\n"; } } //echo $items; return $items; //</code>

I need to get data from a table that has the record of the Company's subsidiaries.
So I just wanted an example of how the code would be, example:

("SELECT DISTINCT (TableX?)
Last edit: 12 years 2 months ago by thiagocs.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48708
  • Thanks: 8319
  • Karma: 1447
12 years 2 months ago - 12 years 2 months ago #213137 by krileon
Replied by krileon on topic Re: Trouble about to get results
You already have an example in your above code (we can't be specific in this regard as we don't know your table structure or database), what is it you're wanting to do more specifically? Display the results of a query on a users profile? Update a table with a users profile data? Or just an example select query?


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.
Last edit: 12 years 2 months ago by krileon.

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

Moderators: beatnantkrileon
Powered by Kunena Forum