class UserInfo extends Database{
private $privileges=
$this
->connect()
->select("users", "DISTINCT privileges", "username= 'someuser'")
->getResult('privileges');
}
It doesn't seem like it is possible for me to be able to define this property $privileges
based on a method based on the parent class Database
.
It is worth pointing out the same function works splendidly when I use the same function in a different script and define the properties dynamically. Each class is instantiated by an object, it works (obviously with the proper setters and getters.)
$db = new Database;
$user = new UserInfo;
$user-> privileges=
$db
->connect()
->select("users", "DISTINCT privileges", "username= '".$user->name."'")
-> getResult('privileges');