$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads, SUM(views) AS views FROM thread'); $totalthreads=number_format($countthreads['threads']); $totalviews=number_format($countthreads['views']);