My Package Libraries Loader DB
Permalink
hi there
I am looking for loader db in my package libraries that I want to current of bID from block in libraries function.
package
|
|-test
|
|- libraries - test.php
function tester(){
$db = Loader::db();
current block bID ?
}
|-test
|
|- block - view.php
Loader::library('test');
I have tried to use code $this->bID but it message error say Fatal error: Using $this when not in object context in.
Any idea
I am looking for loader db in my package libraries that I want to current of bID from block in libraries function.
package
|
|-test
|
|- libraries - test.php
function tester(){
$db = Loader::db();
current block bID ?
}
|-test
|
|- block - view.php
Loader::library('test');
I have tried to use code $this->bID but it message error say Fatal error: Using $this when not in object context in.
Any idea
Hello,
This is how you load a library from a package
Load the database connection(ADODB)
I'm not sure where you are looking for the bID. Are you using this library in a block?
Best Wishes,
Mike
This is how you load a library from a package
Loader::library('test', 'my_package_handle');
Load the database connection(ADODB)
$db = Loader::db();
I'm not sure where you are looking for the bID. Are you using this library in a block?
Best Wishes,
Mike
Hello mkly
Thanks for your replied.
No I'm using libraries in Package
my_package_hand-->libraries
Thanks for your replied.
No I'm using libraries in Package
my_package_hand-->libraries
I think, I was wrong. But should be use my_ package_hand-->block-->libraries if that will be work.
my_ package_hand-->block-->libraries
my_ package_hand-->block-->libraries
Why is not working $this->btTable in my package hand libraries - test.php?
It's message error 'Fatal error: Using $this where not in object context in'
It's message error 'Fatal error: Using $this where not in object context in'
If you are making a library, then it is not a block. So none of the block functions work because you are not in a block -- instead you are in a library.
Anyone can help please thanks