I have a list of urls all with an auto increment id
ID | URL
1 | blah1
2 | blah2
3 | blah3
4 | blah4
5 | blah5
is there a way so that if i remove id 3, id 4 and 5 will drop down and become 3 and 4?
This is some example code of what i'm doing:
$viewresult = mysql_query('SELECT * FROM `xfire_ads`') or exit(mysql_error());
$num_rows = mysql_num_rows($viewresult);
$autoreset = "ALTER TABLE `xfire_ads` AUTO_INCREMENT = $num_rows";
mysql_query($autoreset);
echo("<table border=\"1\" cellpadding=\"5\" cellspacing=\"0\">");
while ($row = mysql_fetch_row($viewresult)) {
echo "<tr><td>id [".$row[0]."]</td><td>".$row[1]."</td></tr>";
}
echo("</table>");