updated sql query in c_posts.php