$sql = "DELETE FROM youritems WHERE User = 0 OR User = 4"; $sql2 = "DELETE FROM userinfo WHERE ID = 0 OR 4"; $result = mysql_query($sql); $result = mysql_query($sql2); echo "Accounts Reseted!";
I want to delete accounts who have not been active for more than 200 days (via a strtotime), I put the above together to see if I could delete records with either the values in, however when the script is runs it deletes all of the records in the database, does anyone know how I can fix this?
(I put 0 and 4 as a test, I hope to later replace it with a variable e.g. $userstodelete, and $userstodelete will push in some search results)