Post hit counter

get_results( "SELECT ID,post_title,post_date,post_content,post_excerpt,meta_value as views FROM $wpdb->posts p JOIN $wpdb->postmeta pm ON p.ID = pm.post_id WHERE meta_key = 'post_views_count' AND meta_value != '' AND post_status = 'publish' AND post_type='post' GROUP BY p.ID ORDER BY ( meta_value+0 ) DESC LIMIT 5" );
echo '

    ';
    foreach( $viewed as $post ){
    $categories = get_the_category($post->ID);
    ?>
    <li>
    <span class="username"></span> <a href="ID); ?>" class="clearfix">cat_name;?><span class="title">post_title;?></span></a>

    post_content)),0,100);?>...

    </li>