<?
include ("dbConnect.php");
include ("queryList.php");
$sql = "SELECT * FROM tbl_Country";
# syntax: queryList( $sql, $link, $page, [$rowsPerPage [, $pageLimit ]])
$queryList = new queryList( $sql, 'testQueryList.php?', $page );
$result = mysql_query ($queryList->sql);
?>
<table cellpadding=0 cellspacing=0>
<tr bgcolor=#808080 height=25 nowrap>
<td width=150 nowrap> <b>Country Code</b></td>
<td width=250><b>Country</b></td>
</tr>
<?
# list elements in table with changing background on each row
while ( list ( $code, $country ) = mysql_fetch_row($result) ){
if($bgcolor=='#C9C9C9'){ $bgcolor='#DFDFDF'; } else { $bgcolor='#C9C9C9'; }
echo "<tr bgcolor=$bgcolor height=25 nowrap>";
echo "<td> $code</td>";
echo "<td>$country</td>";
echo "</tr>";
}
?>
</table>
<?
if($queryList->total >= 1) { echo "<br>Displaying records <font color=red>$queryList->start</font> -
<font color=red>$queryList->stop</font> of <font color=red>$queryList->total</font>."; }
if($queryList->pages > 1) { echo "<br>Pages ( $queryList->pages ) : $queryList->result "; }
?>
|