fsaerospace
IS-IT--Management
Hi All!!
I want to compare results from two MySQL queries.
Lets say I have two databases with approx. the same data (i.e. employee names).
SQLquery1=select employees from sf_emps order by employees
Array1=(aaron,abott,babbot,cabbot,dabbot,fabbot)
SQLquery2=select employees from OTHERDATABAE order by employees
Array2=(aaron,babbot,cabbot,dabbot,fabbot)
So, both arrays have been created from the results of the two sql queries.
Now, I want to loop through and see if each of the employees in Array1 are in Array2. If one of the employees isn't then I want to print out: "Booboo, you have a missing entry in the second database!" or something like it
What is the best and most efficient way to do this???
THANKS for your help!!
- matthias
I want to compare results from two MySQL queries.
Lets say I have two databases with approx. the same data (i.e. employee names).
SQLquery1=select employees from sf_emps order by employees
Array1=(aaron,abott,babbot,cabbot,dabbot,fabbot)
SQLquery2=select employees from OTHERDATABAE order by employees
Array2=(aaron,babbot,cabbot,dabbot,fabbot)
So, both arrays have been created from the results of the two sql queries.
Now, I want to loop through and see if each of the employees in Array1 are in Array2. If one of the employees isn't then I want to print out: "Booboo, you have a missing entry in the second database!" or something like it
What is the best and most efficient way to do this???
THANKS for your help!!
- matthias