I have two tables :
Table 1 (overall Score )
Table 2 (weekly score )
I have a leaderboard where I am echoing the overall score value from T
1) Join the the queries into one
select EmployeeTable.*,Table2.pointsRewarded as `weeklyDelta`
from EmployeeTable join Table2 on EmployeeTable.EmployeeID = Table2.EmployeeID
where Table2.WeekNumber = 'week1'
order by Total_points_Rewarded desc
2) Then give the employees with negative deltas a special class
" .
$toprow2['overallRank'] . "" .
$toprow2['EmployeeName'] . "" .
$toprow2['Total_points_Rewarded'] . "
3) give those employees a style
.parent-div.dropped { color:red }