Jump to content

Closing the row gap in a table


Diegar

Recommended Posts

Finally figured it out.

			$getIDquery = "SELECT id FROM $user ORDER BY id";			$getID = mysql_query($getIDquery,$msa) or DIE (mysql_error());			$remNum = mysql_numrows($getID) or DIE (mysql_error());			while($downLine <= $remNum) 				{				$setNew = "UPDATE $user SET id = '$line' WHERE id = '$downLine'";				mysql_query($setNew) or DIE (mysql_error());				$downLine++;				$line++;				}

When i removed the row in previous code, $line was the row id number. If row 2 was deleted, '$line = 2' from POST. $downLine = $line + 1Hope that helps anyone with a similar issue.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...