Fetching the particular post having post type page
I m facing some problem when I fetch page content of particular Id .I m using the code given below.Please have a look .There is many pages in my database I just want to show the page having id =30 and post_type=page.When I m using the code given below it show all page content having post_type=page.But I just only the one.I think there is some syntax problem in my code .Please help me its very very urgent. I need to fix this immediately.
<?php $loop = new WP_Query( array( 'post_type' => 'page','ID'=> 30) ); while ( $loop->have_posts() ) : $loop->the_post(); the_content(); endwhile; ?>
global $wpdb; $details = $wpdb->get_var("SELECT * FROM $wpdb->posts WHERE ID=30 and post_type='page'"); return $details;
<?php $args=array( 'post_type'=>'page', 'post__in' => array('595', '33', 44) ); $the_query = new WP_Query($args); ?>
Errm, what happened to good old get_post(30)?