I have site i need to modify without changing anything and only way i can do it is by adding mytable which has status field.
Now i have request like
if...{
$filter = "status = 0";
}
SELECT first_name, last_name, position, wage
FROM table1, mytable
WHERE table1.id = mytable.id
$filter
Problem is that both "table1" and "mytable" have statuses and i cannot do anything about this because this filter used also for 16 other requests looking "exactly similar" except they use instead table1 - table2, table3, table4, table5, table6,... etc and status used only for filtering can someone help?
Is in MySQL something like $this in php class so it knows i reference to table in FROM field so i could use JOIN LEFT instead of specifying table in FROM?