• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[BUG] PDO not accessible at all subpages.

Vean

Member
Joined
Dec 15, 2008
Messages
111
Reaction score
13
Location
Poland
Hi, i'm making extension for an layout that needs to request SQL query. I'm trying by PDO but it only works on some pages. For example: script works perfectly at Home page, but at forum page it return error that PDO is not accessible (is not an object).

Have any idea?

I'm using PDO return function from POT library:
PHP:
$sql = POT::getinstance()->getDBHandler();
 
You can use $CI =& get_instance(); and it will return u all CI functions including around 5 DB drivers
 
I don't know about how CI works, but i think it is similar to CakePHP: vendors (in that case, POT) is loaded only on some specific components or controllers.
 
Back
Top