![]() |
Code works, but move it to a class and it stops
Ok, I've been tearing my hair out over this trying to figure out what is going on. I'm at a loss, and probably just missing something REALLY simple, but I'm at a total loss.
I'm writing a little custom vba module for my guild. I have 3 templates that I pull in So I do something like this PHP Code:
Now, trying to put it into a class PHP Code:
"iCount = " I'm horribly confused :( |
Code:
$instances = $this->theDB->db->fetch_array( $this->theDB->db->query_read("SQL STUFF HERE" ) ); |
Perhaps I'm just very dense today, but I don't see the difference or the problem >.<
|
it should be like this:
PHP Code:
Things to notice are the &'s and the naming convention of registry to hold the vBulletin object (not required, but conforms to vB's approach) |
Ah!
Thank you very much. Still kind of new to php programming, but been writing in C++ for years. Thanks again :) |
Yeah, the ampersand is a little annoyance with PHP 4, but it becomes habit to add it eventually.
|
Quote:
(Look at your code, you've used fetch_array() twice. ) |
All times are GMT. The time now is 02:14 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|