I suggest you to take a look at the following article which includes using yii's gii
Gii: generate CRUD application from existing database tables?
Pergunta
I have a mysql database with tables that have one to many relationships with foreign keys linking them.
How can I use gii to create CRUD form pages which will reflect the table relationships?
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow