<?php
$db = mysqli_connect('localhost', 'root', '', 'remonty');
$query = "SELECT imie,cena FROM klienci JOIN zlecenia USING(id_klienta) WHERE miasto = 'Poznań' AND rodzaj = 'malowanie';";

$result = mysqli_query($db, $query);
while ($row = mysqli_fetch_assoc($result)) {
    echo $row['imie'] . '  ' .  $row['cena'] . "<br>";
}
mysqli_close($db);
