Yii Framework Forum: User settings mechanism - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

User settings mechanism Rate Topic: -----

#1 User is offline   Equ 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 57
  • Joined: 27-November 09
  • Location:Russia, Moscow

Posted 05 June 2010 - 04:36 AM

Hi guys!

I need some help with user settings mechanism for my Yii-based application.

I've created the following db structure to store user settings:

1. table `user` with the following fields

id | username | email | etc.


2. table `settingslist` (to store a list of all possible settings with descriptions) with the following fields

id | code | name | description


3. table `settings` (to store all user settings) with the following fields

id | userid | settingslistcode | value


Now I'm stuck with the form which allows user to change his settings. I had to deal before with the regular models (i.e. for posts, comments, etc.) where every new model had only one row in the database (Post model - id | title | body |) with the certain amount of attributes (fields of the table). But now I need to store user settings in 10-15 rows and I don't know how to apply Yii model mechanism to work with this, so I can retrieve those settings in a single form (so user could change his preferences).

Any suggestions are greatly appreciated.

Thank you!
0

#2 User is offline   zaccaria 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 2,232
  • Joined: 04-October 09
  • Location:Moscow

Posted 07 June 2010 - 01:16 AM

You should collect a tabular input
0

#3 User is offline   Equ 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 57
  • Joined: 27-November 09
  • Location:Russia, Moscow

Posted 07 June 2010 - 03:44 PM

View Postzaccaria, on 07 June 2010 - 01:16 AM, said:



Thank you very much! :)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users