query("SELECT * FROM {$tablepre}threads WHERE subject = '{$subject}' LIMIT 1"); if ($db->num_rows($query)>0){ echo('1'); } else { echo('0'); } $db->close; dexit(); ?>