Kunena 6.3.0 released

The Kunena team has announce the arrival of Kunena 6.3.0 [K 6.3.0] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x. This version addresses most of the issues that were discovered in K 6.2 and issues discovered during the last development stages of K 6.3

This is for users to help other users, to discuss topics that are related to forum administration in general or problems in running Joomla. This is not the place to ask for Joomla support. If you want assistance with Joomla please ask at forum.joomla.org

Question MySQL Database Code load query question

  • C0n
  • C0n's Avatar Topic Author
  • Offline
  • Premium Member
  • Only the strongest will survive
More
12 years 3 months ago - 12 years 3 months ago #1 by C0n
So i see this allot through the joomla framework and i am curious to what the diffrence between running the code that contains
Code:
(int)$database->loadResult();

And
Code:
$database->loadResult();

No matter what one you use they both have the same output but i just can not find or figure out what the purpose of the "(int)" is ?

When i look around i find on PHP.net it is a integer of some kind for defining variables and functions. ( php.net/manual/en/language.types.integer.php )
Last edit: 12 years 3 months ago by C0n.

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

More
12 years 3 months ago #2 by xillibit
Hello,

by adding (int) your are that the variable $database->loadResult(); in an integer

I don't provide support by PM, because this can be useful for someone else.

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

  • C0n
  • C0n's Avatar Topic Author
  • Offline
  • Premium Member
  • Only the strongest will survive
More
12 years 3 months ago - 12 years 3 months ago #3 by C0n
So does it increase or decrease the queries performance ? Also i thought there should be a value for integers. not just (int) or it tells it to use a default value ?
Last edit: 12 years 3 months ago by C0n.

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

More
12 years 3 months ago #4 by Matias
It has no effect on performance, but simplifies code in the case if the query doesn't find an item. In that case it returns 0 and not NULL, which may need further check.

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

Time to create page: 0.356 seconds