$post = $pdo->prepare('SELECT * FROM post ORDER BY id DESC LIMIT 2');
$post->execute();
$news = $post->fetchAll(PDO::FETCH_BOTH);
<?php foreach ($news as $n): ?>
<p><strong><?php echo $n['date'] ?></strong> <?php echo $n->h1 ?></p>
<?php endforeach ?>
select id_item from tablename where (prop = 'naz2' and val = 2) or (prop = 'naz1' and val = 1)
group by id_item
having count(0)=2
select id_item from tablename t1
join tablename t2 using(id_item)
where (t2.prop = 'naz2' and t2.val = 2) and (t1.prop = 'naz1' and t1.val = 1)