Hi,
ich mache in PHP eine Mysql-Abfrage.
}
$sql = "SELECT * FROM pp_products WHERE cat=6 OR cat=7 OR cat=8 ORDER BY date DESC LIMIT 8";
$result = mysql_query($sql, $conn);
if ($result)
{
[/PHP]
Das Ergebnis wird so dargestellt:
[PHP]{
echo('<table border="0" cellspacing="0" cellpadding="0">');
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$datum = datum_richten($row['date']);
echo '<tr><td colspan=3 height=5></td></tr><tr><td valign=top><b>'.$datum.'</b></td><td width=10></td><td valign=top><a href=http://xxx/showproduct.php?product='.$row['id'].'&cat='.$row['cat'].'>'.$row['title'].'</a></td><td width=10></td><td valign=top>'.$row['extra2'].'</td></tr>';
}
echo ('</table><table><tr><td height=10></td></tr></table>');
}
Ich möchte nun die Darstellung der Ausgabe so erweitern, dass in der Zeile je Kategorie (Cat 5, 6 oder 7) noch eine zusätzliche Angabe (Cat 5 = A, Cat 6= VZ/TZ) aufgeführt wird.
Wie machen?