I have some php code that generates multiple MySql queries and combines the results. I am trying to find a way to combine the queries so the only fields that match in both queries are outputed.
Example of PHP Codes Output.
SELECT LoadData_3 pow FROM tblLoadData WHERE LoadData_1 = 'test1' AND LoadData_2 = 'test2'
UNION ALL
SELECT LoadData_3 pow FROM tblLoadData WHERE LoadData_1 = 'test3' AND LoadData_2 = 'test4'
I want only the LoadData_3 fields that are the same in both queries.