Here is a tibit a code I used on one of my games
$x = 1000;
$y = 950;
$result = mysql_query ("SELECT * FROM $table WHERE x > '$x' && y > '$y' ORDER BY id DESC");
$nRows = mysql_num_rows($result);
for ($i=0; $i< $nRows; $i++){
$row = mysql_fetch_array($result);
$theid = $row['id'];
$query124 = "DELETE FROM $table WHERE id= '$theid'";
mysql_query($query124) or die;
}
I am self taught and make no guarantees, but that worked for me
|