I have the following Query and PHP:

    $menulisting = $pdo->query("SELECT DISTINCT MK.menu_kaart_id, MK.menu_kaart_type_nl, MK.menu_kaart_type_en, MI.language_abbr, MI.menu_item, MI.menu_item_description, MI.menu_item_price, MI.menu_item_price_2
	                        FROM menu_kaart MK
                                INNER JOIN menu_kaart_items MI ON MK.menu_kaart_id = MI.menu_kaart_id
                                WHERE MK.menu_kaart_id = $menu_id
                                AND   MI.language_abbr = '$language_abbr' ");
    while($row = $menulisting->fetch()) {
	  $menu_title = $row["menu_kaart_type_$language_abbr"];
      echo '<h1>'. $menu_title .'</h1>';

But the menu_title is echod multiply the number of menu_items each menu_kaart_id has. As you can see am I using DISTINCT and have I tried RIGHT JOIN instead of INNER JOIN, but nothing is doing the trick. What should I change in this structure. Thank you in advance

Solved. I just used two separate queries instead.

solved worked around FTFY :wink:

printing out a one-to-many relationship so that the “one” data appears only once is a pretty basic programming technique

unfortunately i don’t do php or i’d show you

You’re right about the worked around :wink: I am not the best in PHP myself. Used to work most of the time with CF but hey