<?
//not tested
$ts=time();

$sql = "DELETE tblMagnets, tblMoves " .
       "FROM tblMagnets, tblMoves ".
       "WHERE tblMagnets.ID=tblMoves.Magnet ".
       "AND UNIX_TIMESTAMP(tblMagnets.Expires)<$ts";
if (mysql_query($sql))
{
}
else
{
   echo("error=3");
}
?>

