title: Mathematical operations using MySQL and/or PHP
body: <h3>SQL1</h3>
  
  <pre><code>$sql1 = "SELECT group_concat(Gericht_ID separator ',') as Gericht_ID FROM `warenkorb` WHERE Kunde_ID = '$kid'";
      $result = mysqli_query($con, $sql1);
      $row = mysqli_fetch_array($result);
      $gerid = $row["Gericht_ID"];
      print $gerid;
  </code></pre>
  
  <h3>SQL2</h3>
  
  <pre><code>$sql2 = "SELECT group_concat(warenkorb.Menge separator ',') AS Menge FROM warenkorb INNER JOIN enthaelt ON  warenkorb.Gericht_ID=enthaelt.Gericht_ID WHERE enthaelt.Gericht_ID IN($gerid) AND warenkorb.Kunde_ID='$kid'";
      $result = mysqli_query($con, $sql2);
      $row = mysqli_fetch_array($result);
      $gwmenge = $row["Menge"];       
      print $gwmenge; //i get here 1,1,1,1,3,3,3
  </code></pre>
  
  <h3>SQL3</h3>
  
  <pre><code>$sql3 = "SELECT group_concat(zutaten.Menge separator ',') as Menge FROM `zutaten` INNER JOIN enthaelt ON zutaten.Zutat_ID=enthaelt.Zutat_ID WHERE Gericht_ID IN($gerid)";
      $result = mysqli_query($con, $sql3);
      $row = mysqli_fetch_array($result);
      $gzmenge = $row["Menge"];
      print $gzmenge; //I get here 45,76,10,92,32,88,36
  </code></pre>
  
  <h3>SQL4</h3>
  
  <pre><code>$sql4 = "SELECT group_concat(Menge separator ',') as Menge FROM `enthaelt` WHERE Gericht_ID IN($gerid)";
      $result = mysqli_query($con, $sql4);
      //print $sql4;
      $row = mysqli_fetch_array($result);
      $gemenge = $row["Menge"];
      print `$gemenge` // I get here 3,1,2,2,3,2,1
      $mengetotal=$gwmenge*$gemenge;// here i want (1,1,1,1,3,3,3 *3,1,2,2,3,2,1) =3,1,2,2,9,6,3
      print $mengetotal;
      $mengezutaten =$gzmenge - $mengetotal;// here i want(45,76,10,92,32,88,36- 3,1,2,2,9,6,3)= 42,75,8,90,23,82,33
      print $mengezutaten;
  </code></pre>
  
  <p>How can i make this ? My code mybe is not right i am sorry for this. Can someone help me ? Thank you in advance.</p>