How do I make the object global in the function?
I tried -
global $DB;
$DB = new sqlDBO();
But I still get the same error when trying to access the object inside the separate function.
This is a very stripped down, basic version of what I'm trying to do -
require "_dbFunctions.php";
$ado = new sqlDBO();
if ($result = $ado->dbSelect("cmsusers", "1 ORDER BY ID", "*"))
{
print "true";
}
function blowUP ()
{
if ($result = $ado->dbSelect("cmsusers", "1 ORDER BY ID", "*"))
{
print "true2";
}
}
blowUP();
The call to the dbfunction in blowUP always fails with that error message.