Autrozation with roles

I didn’t get everything about role based autrorization and I was thinking is there any complete

samples about role based authorization also with sample code or idea to MySQL.

I got working my authorization to MySQL table users:

CREATE TABLE `users` (

  `idUser` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'automatic id',

  `username` varchar(128) DEFAULT NULL COMMENT 'username as a emai',

  `password` varchar(64) DEFAULT NULL COMMENT 'Password',

  PRIMARY KEY (`idUser`)


/*!40101 SET character_set_client = @saved_cs_client */;

And I’m wondering what should look the other tables and I dont even know how many they should be

to create application with four different roles: user, advanced user, admin, host admin. I don’t know should I use AuthItem, AutChild e.g to relisize the application.

Does any one have a sample data from database(preferrible MySQL) and php-files to do this kind of typical authorization system?

Thanks in advance if someone can link me somewhere.

EDIT: i found some test data called schema.sql