function tab_zeilen($p_id) { $result = mysql_query("SELECT * FROM WEG_HGA_ZEILEN WHERE AKTUELL='1' && WEG_HG_P_ID='{$p_id}' ORDER BY KONTO, ART ASC") or mysql_error(); $numrows = mysql_numrows($result); if ($numrows) { echo "<table class=\"sortable\">"; echo "<tr><th>KONTO</th><th>TEXT</th><th>ART</th><th>BETRAG</th><th>HNDL BETRAG</th><th>ZUORDNUNG</th><th>SCHLÜSSEL</th></tr>"; while ($row = mysql_fetch_assoc($result)) { $id = $row['ID']; $konto = $row['KONTO']; $art = $row['ART']; $text = $row['TEXT']; $betrag = $row['BETRAG']; $betrag_hndl = $row['HNDL_BETRAG']; $genkey_id = $id = $row['GEN_KEY_ID']; $kos_typ = $row['KOS_TYP']; $kos_id = $row['KOS_ID']; $r = new rechnung(); $kos_bez = $r->kostentraeger_ermitteln($kos_typ, $kos_id); $bk = new bk(); $bk->get_genkey_infos($genkey_id); echo "<tr><td>{$konto}</td><td>{$text}</td><td>{$art}</td><td>{$betrag}</td><td>{$betrag_hndl}</td><td>{$kos_bez}</td><td>{$bk->g_key_name}</td></tr>"; } echo "</table>"; } }