Location: PHPKode > scripts > PHP Online Invoice System > php-online-invoice-system/editclient_include_inv.php
<?
$result = mysql_query("SELECT count(*) AS num FROM acctrecv WHERE clientid = '$id'");
$num = mysql_result($result,0,"num");

if ($num < 1){

//printf("<td align=left><font face=Verdana size=1 color=red>There are no Records</font></td>",$num); //prints number
echo "<p><table border=1 cellspacing=0 cellpadding=2 bordercolor=#000000 width=100%>";
echo "<tr align=top>
<td class=topHeadrow4><b>There are no Records</b></td></tr></table>";
return false;
}
else
{
$result = mysql_query("SELECT * FROM acctrecv WHERE clientid = '$id' ORDER BY invoiceid",$db);
}
echo "<p><table border=1 cellspacing=0 cellpadding=2 bordercolor=#000000 width=100%>";
echo "<tr align=top>
<td class=topHeadrow5><b>Inv. #</b></td>
<td class=topHeadrow5><b>Payment Date</b></td>
<td class=topHeadrow5><b>Amount received</b></td>
<td class=topHeadrow5><b>Comments</b></td></tr>";

while ($acctrow = mysql_fetch_array($result))
{
$acctclientid=$acctrow["clientid"];
$acctinvoiceid=$acctrow["invoiceid"];
$acctamtrecv=$acctrow["amt_recv"];
$acctrecvdate=$acctrow["recv_date"];
$acctdateshow=fixDate($acctrecvdate);
$acctcomments=$acctrow["comments"];

if ($alternate == "1") {
	$color = "#ffffff";
	$alternate = "2";
	}
	else {
	$color = "#e5e5e5";
	$alternate = "1";
	}

echo "<tr valign=top bgcolor=$color>

<td align=center NOWRAP>$acctinvoiceid</td>
<td align=center NOWRAP>$acctdateshow</td>
<td align=right>$currency$acctamtrecv</td>
<td align=left><p>$acctcomments</p></td></tr>";

}
echo "</table>";

?>
Return current item: PHP Online Invoice System