Welcome Guest, Not a member yet? Register   Sign In
changing the table name with a variable
#2

maybe in principle ..along the lines .no clue if its going to work
Code:
class UserModel extends Model
{
    protected $table ;


public function setTableName($parameter)
    {
        $this->table= $parameter;
    }

controller

Code:
$handle = new UserModel();
$handle->setTableName('sometable');
$handle->someOtherModelMethod();
//maybe use a getter method
CMS CI4     I use Arch Linux by the way 

Reply


Messages In This Thread
RE: changing the table name with a variable - by captain-sensible - 12-17-2023, 02:58 PM



Theme © iAndrew 2016 - Forum software by © MyBB