Question about models |
[eluser]darren884[/eluser]
Whats the table format? I could not find it in the user guide... say for instance if I had a table named online_games what would the model name be? Thanks...
[eluser]Thorpe Obazee[/eluser]
The model names aren't associated with the table's names. You can name it anything as long as it follows the guidelines. http://ellislab.com/codeigniter/user-gui...odels.html
[eluser]Thorpe Obazee[/eluser]
They don't. Code: $query = $this->db->get($table_name); although there are options like storing the table name in a property.
[eluser]Dam1an[/eluser]
Although you can call your models anything you want, I call mine the singular of the table (in most cases) So if I have a users table, the primary model for that table would be user (well, user_model.php, I add the suffix to avoid collisions) |
Welcome Guest, Not a member yet? Register Sign In |