Welcome Guest, Not a member yet? Register   Sign In
$this->setTable() or $this->table not sticking
#3

(This post was last modified: 03-22-2021, 05:16 AM by Kaosweaver.)

(03-19-2021, 11:21 AM)InsiteFX Wrote: When working with multiple tables you should always call.

PHP Code:
$this->table->clear(); 

Before setting up a table again.

Tried it two ways:
PHP Code:
$this->table->clear(); 

resulted in:
Code:
Call to a member function clear() on string
(which makes sense, $this->table is a string)

and:

PHP Code:
$this->clear(); 

resulted in:
Code:
BadMethodCallException

I looked for the clear() function in the database system folder, didn't find it. I found a clear() function in the email and the table array parts of the system folder, but nothing under database.

So, still looking for an answer to this if anyone has any ideas.

I added:

PHP Code:
$this->from($this->tabletrue); 

After the setTable for the new table and it did the job. The setTable function *should* be doing this in the set table in the framework as I can't see a logical reason to not have the table change when a setTable function is called.
Reply


Messages In This Thread
RE: $this->setTable() or $this->table not sticking - by Kaosweaver - 03-22-2021, 05:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB