Lionel
08-06-2006, 12:03 AM
I am able to get those values in an array
Array ( [0] => stdClass Object ( [id] => 4 [roleid] => 4 [name] => Free [chat] => 0 [forum] => 1
How can I extract them so I can do
$_SESSION['security'][roleid]=4;
$_SESSION['security'][name]=Free;
etc for each one of them?
foreach ($security as $k=>$v)
is not returning anything but the first one '0' without even the name.
Here is the full query
$database->setQuery("SELECT * FROM membership WHERE roleid = '$_SESSION[RoleId]'");
$security = $database->loadObjectList();
print_r($security);
Thanks.
Array ( [0] => stdClass Object ( [id] => 4 [roleid] => 4 [name] => Free [chat] => 0 [forum] => 1
How can I extract them so I can do
$_SESSION['security'][roleid]=4;
$_SESSION['security'][name]=Free;
etc for each one of them?
foreach ($security as $k=>$v)
is not returning anything but the first one '0' without even the name.
Here is the full query
$database->setQuery("SELECT * FROM membership WHERE roleid = '$_SESSION[RoleId]'");
$security = $database->loadObjectList();
print_r($security);
Thanks.