//gets a table called engine4_authorization_permissions
$permissionTable=Engine_Api_()->getDbTable('permissions','authorization');
$permissionSelect=$permissionTable->select()->where('level_id'=?,$userlevel)->where('type'=>'usercommit');
$fetchdata=$permissionTable->fetchrow($permissionSelect);
$fetchdatas=$permissionTable->fetchrows($permissionSelect);
//To get attribute from row
echo $fetchdata->attribute_name
foreach($fetchdatas as $fetchdata)
{
echo $fetchdata->attribute_name;
}
$permissionTable=Engine_Api_()->getDbTable('permissions','authorization');
$permissionSelect=$permissionTable->select()->where('level_id'=?,$userlevel)->where('type'=>'usercommit');
$fetchdata=$permissionTable->fetchrow($permissionSelect);
$fetchdatas=$permissionTable->fetchrows($permissionSelect);
//To get attribute from row
echo $fetchdata->attribute_name
foreach($fetchdatas as $fetchdata)
{
echo $fetchdata->attribute_name;
}
No comments:
Post a Comment