I must be an idiot, because I can't get it to work, lol.. If I were to totally remove my DELETE from and paste your code, I get: Fatal error: Call to a member function on a non-object in /wwwscripts/yearnotactive.php on line 9
Here is my original code the entire length of the file
PHP Code:
<?php
$db = mysql_connect('localhost', 'user', 'pass') or
die("Could not connect to database with error (".mysql_error().")");
$db_sel = mysql_select_db('testing', $db) or
die("Could not select database $db_name with error (".mysql_error().")");
mysql_query("DELETE FROM user WHERE (lastvisit<'.(time() - (60 * 60 * 24 * 487)).') AND (usergroupid IN (2, 3, 10, 11)",$db);
?>
I changed all of the $DB_site->query to mysql_query, I also had set it up to require admin/config.php (and commenting out the first 5 lines) I moved the ,$db); to the very end of the last statement, etc. Is what I am trying to accomplish not actually doable using a file like this? eek! Thanks