It is working fine except in the event that the server being passed to the new query does not exist in the destination table. I am not sure how to test for this. I need to see these results as well.
Code: Select all
$query2= "select distinct(computer ), targetgroup
from susdb.dbo.VLO_ComputerStatus2
where SummarizationState =2 or SummarizationState =3 or SummarizationState =6";
$result2 = mssql_query($query2, $dbConn2);
$x="";
while ($row = mssql_fetch_assoc($result2)){
$val = $row['computer'];
$val2= $row['targetgroup'];
$val3="";
$val4="";
$val5="";
$val6="";
echo"-----$val----$val2<br>";
$query3 ="select owner1,owner2,owner3, location from servers.dbo.serverinfo where server ='$val' ";
$result3 = mssql_query($query3, $dbConn2);
$x++;
while ($row = mssql_fetch_assoc($result3)){
do some stuff
}Any ideas?