grantus
Active member
I have two things I'm trying to understand with the Xenforo system.
Let's say I have two tables: MyTable1 and MyTable2. I want to query MyTable1 and use that column value in my query for MyTable2.
In PHP I would simply do a query on MyTable1, set a variable then use that variable in my query for MyTable2.
The second thing is I would use $_GET to get from a URL then use that value in my query.
How can I do these with the Entity/Controller?
I understand about relations in the Entity but I still don't see how I can either get a value from a link (url) or from one table to another.
I saw that I could use this:
But this is where I get confused on how to implement everything.
Let's say I have two tables: MyTable1 and MyTable2. I want to query MyTable1 and use that column value in my query for MyTable2.
In PHP I would simply do a query on MyTable1, set a variable then use that variable in my query for MyTable2.
The second thing is I would use $_GET to get from a URL then use that value in my query.
How can I do these with the Entity/Controller?
I understand about relations in the Entity but I still don't see how I can either get a value from a link (url) or from one table to another.
I saw that I could use this:
Code:
$variable = $this->filter('my_column', 'uint');
But this is where I get confused on how to implement everything.