Ok, here is the script:
You jsut need to add the second where-condition. (where i placed the ????)
This condition will look like
time<='".date(His)-100."'
BUT MAKE A DB-BACKUP BEFORE RUNNING THE SCRIPT!!!!
<?php
mysql_connect("localhost", "bettaverse", "passw");
mysql_select_db("bettaverse");
// This selects ALL users with activated='0'
$sql = "SELECT * FROM users WHERE activated = 0 AND ????";
$res = mysql_query($sql) or die("Couldn't connect to db");
if(mysql_num_rows($res)==0)
{
// No users found in db!
echo "no users found";
}
else
{
// Send email to all users:
while($row = mysql_fetch_array($res))
{
// Email to user with address $row["field_user_email"]
// See function email() for more infos!
}
// Delete all users:
$sql = "DELETE FROM users WHERE activated = 0 AND ????";
}
?>