get_pages Not accepting my query

I have pulled up stumps on this approach and gone back to my original function. It goes through the posts, looks for the Partner Level passed to it, and then retrieves a list of pages. I then display a styled list with the posts thumbnail as the clickable link. Will need to tweak for reach desired accessibility level, but thats for later. I appreciate your comments to this question.

For future reference:

function the_partners($cpLevel) {
global $wpdb;

 $querydetails = "
   SELECT wposts.*
   FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta
   WHERE wposts.ID = wpostmeta.post_id
   AND wpostmeta.meta_key = 'Partner_Level'
   AND wpostmeta.meta_value="$cpLevel"
   AND wposts.post_status="publish"
   AND wposts.post_type="page"

   ORDER BY wposts.post_title ASC
 "; 

$pageposts = $wpdb->get_results($querydetails, OBJECT);

echo "<ul class=\"logobox clearfix\">";
        foreach ( $pageposts as $page ) {
                $option = '<li>';
                $option .= '<a href="' . get_page_link( $page->ID ) . '">' . get_the_post_thumbnail( $page->ID ) . '</a>';
                $option .= '</li>';
                echo $option;
        }
echo "</ul>";    

}

tech