I just deleted a row from my mysql table.
Now whenever I write the statement “INSERT INTO myTable” a new row is added at the position in the table where the last row was deleted.
How do I modify the “INSERT INTO myTable” statement so that rows are added to the bottom of the table?
EDIT:
For clarification this is the php code I use to print the stuff in the database
$result = mysql_query("SELECT * FROM People")
or die(mysql_error());
echo "<table border='1'>";
echo "<tr><th>FirstName</th> <th>LastName</th></tr>";
while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row into a table
echo "<tr><td>";
echo $row['FirstName'];
echo "</td><td>";
echo $row['LastName'];
echo "</td></tr>";
}
echo "</table>";
And it’s printing the last row I added in the middle of the table in the same position of the last row that I deleted.
This actually depends on storage engine and primary key. But better do not rely on the phisical order of the data, but specify
ORDER BYin your queries.