Hello all,
I have been reading a few questions previously asked and I haven't come across one that answers my question in "black and white" for me! So, apologies if this is repetitive. The question is probably similar to asking, "how long is a piece of string" but bear with me!
For a registration system, I have a user model with functions such as:
- add_user
- delete_user
- activate_user
The above user model deals with one table. The users table in the MySQL database.
You can guess what each function does but is this coarse enough? I mean should my model contain methods that are much broader such as:
- add_record
- delete_record
- update_record
Where I pass in the table and a unique identifier of the record to delete, add or update?
I am using codeigniter, but I am interested in how things should be done in a pure MVC framework.
I apologise if this question is too picky.
Thanks all