Hi,
I have a mysql database containing 100 records, some of these records have a 'position' against them.
Im trying to get the following result....
1. A list containing 100 entries.
2. If li 1 has a 'position' against it, data is entered from the database, or it has default text, this is to carry on to li 100.
What ive got so far follows
$i = 1;
if ($i<=100) {
$SQL = "SELECT * FROM ws WHERE location ='$data' AND position ='$i'";
$result = mysql_query($SQL);
while ($row=mysql_fetch_array($result)) {
echo "<div><ul id='$i'>";
echo "<li id='$row[0]'>$row[4]</li>";
echo "</ul></div>";
}
$i++;
} else {
echo "????";
}
Thanks