add_submenu_page function to show videos table

I asked a similar question and got this answer, to query the DB for attachments and dump them into a list. This was the code that was provided to me:

$media_query = new WP_Query(
    array(
        'post_type' => 'attachment', // get attachments only
        'post_status' => 'inherit', // attachments are not 'published', so set it to inherit
        'posts_per_page' => -1, // display all
        'post_mime_type' => 'video' // grab files with the mime type 'video'
    )
);
$list = array();
foreach ($media_query->posts as $post) {
    $list[] = wp_get_attachment_url($post->ID);
}
// do something with $list here;

Hope this points you in the right direction. My question: Get All Images in Media Gallery?


EDIT: As far as displaying it in a table, I think you could truly benefit from digging through this code: http://wordpress.org/extend/plugins/custom-list-table-example/

It has a working example of using WP_List_Table in WordPress. I took one glance and knew it would be a good code to check out. 🙂

error code: 523