Location: PHPKode > projects > NOLA > invlevellst.php
<? include('includes/main.php'); ?>
<? //invlevellst.php
	echo texttitle('Price Level List');
	if ($order) {
		$orderstr=" order by percent";
	} else {
		$orderstr=" order by description";
	};
	$recordSet = &$conn->Execute('select pricelevel.description, avg(markupsetlevel.markuppercent) as percent from pricelevel left join markupsetlevel on pricelevel.id=markupsetlevel.pricelevelid group by pricelevel.description,markupsetlevel.pricelevelid'.$orderstr);
	if ($recordSet->EOF) die(texterror('No price levels found.'));
	echo '<table align="center" border=1><tr><th><a class="blacklink" href="invlevellst.php">Price Level Description</a></th><th><a class="blacklink" href="invlevellst.php?order=1">Avg Markup %</a></th></tr>';
	while (!$recordSet->EOF) {
		echo '<tr><td><b>'.$recordSet->fields[0].'</b></td><td>'.num_format($recordSet->fields[1], 3).'</td></tr>';
		$recordSet->MoveNext();
	};
	echo '</table>';
?>
<? include('includes/footer.php'); ?>
Return current item: NOLA