Why am I getting an infinite loop with have_posts?
I have the following code, which causes an infinite loop for some reason. Can anybody explain what's going on please?
Thanks!
?php 
$flagged_stores = new WP_Query( array ( 'post_type' = 'store', 'orderby' = 'post_id', 'meta_key' = 'flagged', 'limit' = 10 ) );
   if($flagged_stores-have_posts()): ? 
        div class="table"
            table class="form-table"
                tr
                    thStore/th
                    thFlag Reason/th
                    thDelete Flag/th
                /tr
                ?php while($flagged_stores-have_posts()): ?
                    td?php echo the_title(); ?/td
                    td?php// echo get_post_custom_values('flagged'); ?/td
                    td?php// echo "Delete"; ?/td
                ?php endwhile;?
            /table
    ?php else: ?
            No flags found.
    ?php endif; ?