03-13-2016, 01:51 PM
Dear UserSpice Team ,
I am a newbie to user spice and just started working on PhP MYSQL . of course i love to work in this for the reason it gives me flexibility to make changes on the top of your framework without any restriction .
My query is i need to display the role of the user logged in . Like if he is Administrator then echo as Administrator
I am taking Permission id of the logged in user from users table and comparing it with the id in Permission table and trying to fetch the name of the role from the permission table . But it displays the following error .
<pre></pre>
My code is as follows
<pre></pre>
I am a newbie to user spice and just started working on PhP MYSQL . of course i love to work in this for the reason it gives me flexibility to make changes on the top of your framework without any restriction .
My query is i need to display the role of the user logged in . Like if he is Administrator then echo as Administrator
I am taking Permission id of the logged in user from users table and comparing it with the id in Permission table and trying to fetch the name of the role from the permission table . But it displays the following error .
<pre>
Code:
Notice: Array to string conversion in C:\xampp\htdocs\***\account.php on line 477
Array
My code is as follows
<pre>
Code:
<?php
$query =$db->query("select name from permission where permission.id=users.permissions");
$results = $query->results();
echo $results;
?>