Here is my dilemma. I have two tables that i am wanting to read data from.
Table 1:
product_id
product_name
classification_ id
Table 2:
classification_ id
classification_ name
What i want to be able to do is list all of the products in Table 1 but have the classification_ name from Table 2 be used instead of the classification_ id from Table 1.
As of right now i have it so it lists the classification_ id for each product, but when i try to list the products with the classification_ name it just shows the first classification_ name for all of the products regardless of their classification_ id
[PHP]<?php do { ?>
<tr align="left">
<td><!--//<?php echo $row_products['product_id']; ?>//-->
<?php echo $row_products['product_name'] ; ?>
</td>
<td align="center" valign="middle" >
<?php echo $row_products['classification _id'] ; ?>
</td>
<?php } while ($row_products = mysql_fetch_ass oc($products)); ?>[/PHP]
that is what i have so far. can anyone help me?
Table 1:
product_id
product_name
classification_ id
Table 2:
classification_ id
classification_ name
What i want to be able to do is list all of the products in Table 1 but have the classification_ name from Table 2 be used instead of the classification_ id from Table 1.
As of right now i have it so it lists the classification_ id for each product, but when i try to list the products with the classification_ name it just shows the first classification_ name for all of the products regardless of their classification_ id
[PHP]<?php do { ?>
<tr align="left">
<td><!--//<?php echo $row_products['product_id']; ?>//-->
<?php echo $row_products['product_name'] ; ?>
</td>
<td align="center" valign="middle" >
<?php echo $row_products['classification _id'] ; ?>
</td>
<?php } while ($row_products = mysql_fetch_ass oc($products)); ?>[/PHP]
that is what i have so far. can anyone help me?
Comment