$id_mark=$tech['marka']; $id_model=$tech['model'];
$marks = mysqli_query($db,"SELECT name FROM marka WHERE id='$id_mark'");
$marka = mysqli_fetch_assoc($marks);
$models = mysqli_query($db,"SELECT name FROM model WHERE id='$id_model'");
$model = mysqli_fetch_assoc($models);
SELECT marka.name AS marka_name, model.name AS model_name FROM marka
INNER JOIN model ON model.id = '$id_model'
WHERE marka.id='$id_mark'