Basit bir yöntem ile

$sql = mysql_query("select * from wp_posts WHERE id IN(3, 6, 7)");
İnceleyebilirsiniz.