Welcome Guest, Not a member yet? Register   Sign In
Select with alias in model in CI 4
#2

When you get an instance of the BaseBuilder class, the database table specified in the model is added to it.
This is how the BaseBuilder class is designed.
That is, before you start using QueryBuilder, already called
PHP Code:
->from($this->table); 
//There it is a little different, but the meaning is the same. 

There is nothing you can do about it.

But you can reset the "from" section before using QueryBuilder.
PHP Code:
->from([], true); 
Reply


Messages In This Thread
Select with alias in model in CI 4 - by damiano - 03-04-2021, 09:59 AM
RE: Select with alias in model in CI 4 - by iRedds - 03-05-2021, 11:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB