Moin moin!
Folgendes Problem:
Ich habe eine Tabelle, Kategorie:
Code:
CREATE TABLE IF NOT EXISTS `produkte_cat` (
`id` bigint(20) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`info` text,
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
dazu
PHP-Code:
<?PHP
$sql = "SELECT * FROM produkte_cat ORDER BY name DESC;";
$catview = new Query($sql);
if($catview->numRows() != 0){
while($row = $catview->fetch()) {
echo"<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td>
<span class='Stil4'>[url='?bw=cat&catID=".$row[']".$row['name']."[/url]</span>
[i]".$row['info']."[/i]
[img]Bilder/line5.gif[/img]</td>
</tr>
</table>";
}
}
else
echo"<div align='center' class='normal>· Keinen Eintrag in der Datenbank gefunden ·</div>";
$catview->free();
unset($catview); ?>
Das Funktioniert soweit.
Wenn ich"
?bw=cat&catID=1" aufrufe,
will ich das alle Produke(Inhalte) angezeigt werden, wo in der tabelle
bei catID 1 steht. Nur weiss ich nicht wie:
Code:
CREATE TABLE IF NOT EXISTS `produkte` (
`id` bigint(20) NOT NULL auto_increment,
`catID` bigint(20) NOT NULL default '0',
`name` varchar(255) NOT NULL default '',
`info` text,
`name` varchar(255) NOT NULL default '0.00',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
Schon einmal Danke im Vorraus!!
Bin halt PHPAnfänger
MFG Der-Dirk