How can I check to see if an item has a lower id than of another item on the same table?
I already have this:
while ($row = $result->fetch_array()) {
if ($row[name] == $myusername) {
$mysqli->query("DELETE FROM users WHERE name='$myusername' AND password='$mypassword'");
} }
But this is useless as it deletes the account as soon as it’s made.
You could add it in the WHERE clause
You need to give a schema if you want a better answer