Hey, I am having a heck of a time trying to get something to work. Hopefully someone can help me out!
So I have a mysqli class as such:
class mysqli {
public static $mysqli2;
public function __construct(){}
static function con(){
if(!self::$mysqli2){
self::$mysqli2 = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
}
return self::$mysqli2;
}
}
which I can access from another function by doing something like:
gd::con()->prepare(...)
However I am having trouble accessing this from another class which I have. How can this be done, that is, accessing this function from this mysqli class, from within another class? Thanks!