Welcome Guest, Not a member yet? Register   Sign In
MY_Model table name gotcha
#1

[eluser]CactusCoder[/eluser]
I'm posting this in the hope that it will save someone some precious time.

I just implemented a new module and couldn't get it to run as it kept producing an error about a table not found.

MY_Model assumes that the name of the table associated with the module is a PLURAL.

For instance I named my module 'onsale' and created a table named 'onsale' to go with it.

MY_Model pluralizes the module name to arrive at the table name, so in this case it was looking for a 'onsales' table.

Argh! >:-(
#2

[eluser]pbreit[/eluser]
I didn't think CodeIgniter did that by default. Are you using the CRUD extension?
http://ellislab.com/forums/viewthread/134564/
#3

[eluser]CactusCoder[/eluser]
I'm using PyroCMS - I should have mentioned that...




Theme © iAndrew 2016 - Forum software by © MyBB