Skip to Content Skip to Menu

Query with more than one value as result

  • zapatista
  • zapatista
  • OFFLINE
  • Posts: 28
  • Thanks: 0
  • Karma: 0
11 years 8 months ago #209145 by zapatista
Query with more than one value as result was created by zapatista
Hi all,

another question to change CB-Login-Module:

For simply options at the CB-Login-Module I made some queries to get one value. How it's possible to get two or more values with one query, like that:
<code>
$query = SELECT id, name
From XXX
Where XXX = XXX;
</code>

How can I select the different values from
<code>
$_CB_database->loadResult();
</code>

Or do I need another function??

Thanx

Christian

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 68629
  • Thanks: 9110
  • Karma: 1434
11 years 8 months ago - 11 years 8 months ago #209200 by krileon
Replied by krileon on topic Re: Query with more than one value as result
Yes, but you need to use something other then load result. It's best to load it as an object if you need multiple columns. Example as follows.

$object = null;
$_CB_database->loadObject( $object );

Now you just use $object->column.


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: 11 years 8 months ago by krileon.

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

  • zapatista
  • zapatista
  • OFFLINE
  • Posts: 28
  • Thanks: 0
  • Karma: 0
11 years 8 months ago #209232 by zapatista
Replied by zapatista on topic Re: Query with more than one value as result
OK, I will try this.

Another point: Do the CB-community made some experience with small Onlinegames like Sudoku or plugins for Playstation-Onlinegames? I do not know anything about it, so I ask different people who could know something about games with CB or Joomla. Maybe you heard about a project which is reputable and reliable for small and simple games.

Thanks,
Christian

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 68629
  • Thanks: 9110
  • Karma: 1434
11 years 8 months ago #209248 by krileon
Replied by krileon on topic Re: Query with more than one value as result
I'm not aware of any. Your best bet is checking JED below.

extensions.joomla.org/


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

Facebook Twitter LinkedIn