- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
function get_products($category_id=0) {
/* get all the products under this category */
$qid = db_query("
SELECT
p.id
,p.name
,p.description
,p.price
,p.on_special
,p.images
,p.big_image
,p.price2
,p.price3
,pc.category_id
FROM
products p
,products_categories pc
WHERE p.id = pc.product_id
AND pc.category_id = $category_id
ORDER BY p.name
");
return $qid;
}
?>
<h2><? print_category_tree_collection($id)?></h2>
<table border=0 bordercolor=white>
<tr><td class=h2>
<? if (db_num_rows($qid_c) == 0) { ?>
<? while ($cat = db_fetch_object($qid_c)) { ?>
<li><a href="../collection/?id=<?=$cat->id?>"><? pv($cat->name) ?></a>
<? } ?>
<? } ?>
</td>
</tr>
ZX_Spectrum 03.03.2011 18:16 # 0