PHP Code:
<div class="reportBox10">
<?php $sent1 = $db->Execute("select count(*) as count from " . TABLE_ORDERS . " where orders_status = '6' ");?>
<?php $sent2 = $db->Execute("select count(*) as count from " . TABLE_ORDERS_2 . " where orders_status = '6' ");?>
<?php $last1 = $db->Execute("select count(*) as count from " . TABLE_ORDERS . " where orders_status = '7' ");?>
<?php $last2 = $db->Execute("select count(*) as count from " . TABLE_ORDERS_2 . " where orders_status = '7' ");?>
<div class="header10">
<?php
if ($sent1->fields['count'] < 1) {
echo 'It must be Monday, ' . $sent1->fields['count'] . ' packages sent so far.';
} elseif ($sent1->fields['count'] <= 500) {
echo 'Good Job! ' . $sent1->fields['count'] . ' packages sent this week!';
} else {
echo 'Wow, great work! You have sent ' . $sent1->fields['count'] . ' packages this week!';
}
?>
</div>
</div>
What I want to do is have it so it can get the two database fields added together
$sent1 + $sent2
and then use them in the if argument together so the totals are used...