whooops...
here try this instead
PHP Code:
<?php
$db = mysql_connect('localhost', 'un', 'pw') or
die("Could not connect to database with error (".mysql_error().")");
$db_sel = mysql_select_db('dbname', $db) or
die("Could not select database $db_name with error (".mysql_error().")");
mysql_query("UPDATE thread SET open = 0 WHERE dateline < ".(time() - (60 * 60 * 24 * 364))." AND forumid IN (3,4,5)", $db);
?>