Hey
How i do i get to tables from one database to work together in one site without making a function?
Eksempel:
I have a product_categori table in my database and a product table.
In these tables there are as follows:
product_categori:
id
label
product:
id
name
type
If i want id from product_categori to work together with type from product, what should i do?
I tried this code:
<?php
$kategori = mysql_query("SELECT * FROM products_cat WHERE products_cat_id = '".$products_type."'");
while ($data = mysql_fetch_array($kategori))
{
$id = $data['products_cat_id'];
}
?>
<tr>
<td><a href='index.php?site=produkt_detaljer&type=<?php echo $products_type; ?>'>Tilbage til <?php echo $id; ?></a></td>
</tr>
I hope someone can help.
PS. i know the varibles name in the text aint the same as the ones in the exampel. Just saves some typing :p