CodeIgniter Forums
Capture a specific value from D.B. for Admin permissions - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Capture a specific value from D.B. for Admin permissions (/showthread.php?tid=47774)



Capture a specific value from D.B. for Admin permissions - El Forum - 12-21-2011

[eluser]Unknown[/eluser]
Hello folks

Im a beginner in CI but i just love it Wink.

So im building an App, it has a login view and the users are being stored in a "membership" table in the DB which has a column called "management" which has 2 possibles values One(1) for admins and Zero(0) for regular users (at the moment create the user and stored in the DB, the default value for the "management" column is zero). So, i want to show a link only to admins in the registered_account_view.

I cant describe my exactly query like: Who could i capture the value of "management" column from the table and compare it whit the rule about Admin or regular user, in order to show -or not- the link?

Thanks a lot and forgive my large explanation Smile