Welcome Guest, Not a member yet? Register   Sign In
Model return Undefined variable: table
#2

Two problems immediately apparent with your code:
1) $table is a class property, yet you access it as $table, when perhaps it should be $this->table
2) $table is a string, and will not have any object access ($table->anything.....)

If using CI's model, you would use the Model class' find method, eg. $this->find($item).
The CI model treats the $table property as the name of a database table the model is bound to.
Reply


Messages In This Thread
RE: Model return Undefined variable: table - by ciadmin - 09-15-2019, 01:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB