1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
  | 
      <?php
  // Stallmieten begleichen
   $abfrage = "SELECT * FROM staelle";
  $ergebnis = mysql_query($abfrage);
  while($row = mysql_fetch_object($ergebnis))         
   {
    $abfrage2 = "SELECT id, name, besi, stall, boxart FROM pferd WHERE stall = ".$row->id;
  $ergebnis2 = mysql_query($abfrage2);
  while($row2 = mysql_fetch_object($ergebnis2))         
   {
   $boxart = $row2->boxart;
   $zusatz = 'preis';
// 'Line 38':
   $preis = $row->{$boxart$zusatz};
// hab auch schon $preis = $row->{$boxart}{$zusatz}; probiert
// funktioniert auch nicht :(
   $eintrag = mysql_query("INSERT INTO rechnungen
(id, von, an, summe, datum, text)
VALUES
('', '".$row->besi."', '".$row2->besi."', '$preis', '".time()."', 'Stallmiete für ".$row2->name."')");
   }
   }
?> |