What is the difference between &JFactory::getDBO()
and JFactory::getDBO()
in Joomla 1.5?
Asked
Active
Viewed 404 times
0

SomeKittens
- 38,868
- 19
- 114
- 143

Maha.8622
- 35
- 1
- 7
1 Answers
0
The difference is not a Joomla one, but PHP. In PHP, the ampersand means that instead of assigning the actual value, the value will be passed by reference. This is important, because you don't want a copy of the database, you want the global database object. Thus, one should use $db =&JFactory::getDBO()
.

SomeKittens
- 38,868
- 19
- 114
- 143