1
kalamata
Kernel hack
  • 2006/11/2 12:30

  • kalamata

  • Not too shy to talk

  • Posts: 121

  • Since: 2005/3/3 1


Dear All,

Where does the $this->db database reference in kernel/user.php is initiated? There is no Database::getInstance call within the file.

I am trying to pull information from another database and would like to know the link so that I can include the file (already created in include/common.php, but then it would not recognise the name of the object even if I include include/common.php in kernel/user.php).

Thanks,
George

2
m0nty
Re: Kernel hack
  • 2006/11/2 12:55

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


Quote:
mithrandir

Usually, when calling the database in a handler class, the database object is referenced in a class variable $db - which is used with $this->db->functionName()

In functions and browser-called files, the $xoopsDB variable is usually used with the similar $xoopsDB->functionName().

$this->db is usually set in the handler class constructor (or its parent's constructor)

For more information on $this->something, please refer to the PHP manual on class variables.


from your other thread posted on the 27th.

it might also be helpful to describe in detail exactly what you are trying to achieve.

3
iHackCode
Re: Kernel hack

Quote:

kalamata wrote:
Dear All,

Where does the $this->db database reference in kernel/user.php is initiated? There is no Database::getInstance call within the file.


the $db is passed from the & xoops_gethandler function.. (include/functions.php). to class XoopsUserHandler

my answer is not really specific. since im not sure on what you are doing.
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

Login

Who's Online

259 user(s) are online (221 user(s) are browsing Support Forums)


Members: 0


Guests: 259


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits