i have this quick and simple script that searches through my db and produces results ok -
<?
$result = mysql_query("SELECT * FROM ukd WHERE AREA like '%$search%'");
$list = mysql_num_rows($result);
while ($i < $list) {
$row = mysql_fetch_array($result);
$name = $row["NAME"];
print"$name";
$i++;
}
mysql_free_result($result);
?>
how would i count the results and display a sequential number at the left of the result, (so it would count up 1-n) ??
also i have tried adding
if ($list=='0') {
print"no records";
}
else { result disply
}
does display results but doesn't print the no records ????
any ideas for both queries ???
thanks