$postcount=$db->query_first("SELECT COUNT(*) AS posts FROM post WHERE postid AND post.visible=1"); $totalposts=$postcount[posts];