Click here to Skip to main content
15,896,912 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
Hello,
      the code below is working, but I need to highlight based on result that are
unmatched empno,code & amount in different colors.

This code is for finding unmatched columns from 2 tables [employee & emp_det]

$res = mysql_query("SELECT * FROM employee WHERE NOT EXISTS(SELECT 1 FROM emp_det WHERE empno = emp_det.empno AND code = emp_det.code AND amount = emp_det.amount)");

while($row=mysql_fetch_array($res))
{
echo "<tr>";
echo "<td align="center" width="200">" . $row['emp_no']. "</td>";
echo "<td align="left" width="200">" . $row['name'] . "</td>";
echo "<td align="left" width="200">" . $row['dept'] . "</td>";
echo "<td align="center" width="100">" . $row['code'] . "</td>";
echo "<td align="center" width="100">" . $row['amount'] . "</td>";
echo "</tr>";
}

echo "";

need to highlight unmatched values in the 3 columns
Posted
Updated 22-Jan-14 22:44pm
v3

1 solution

Use the condition that you want to check if true then append the css to TD. Sorry I don't know PHP so cant give you the code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900