Welcome Guest, Not a member yet? Register   Sign In
Using id to get another field from the table
#1

[eluser]rijobo[/eluser]
I've got a table product where i for example use materiaal_id. This is the id from the table materiaal. I would like to use the field name of that table.
So when I use this in my view:

Code:
<?php
if ($this-> session-> flashdata('conf_msg')){
    echo $this-> session-> flashdata('conf_msg');
}

echo "<tr>";
echo "<td colspan='2'>";
echo $product['naam'];
echo "</td>";
echo "<tr>";
echo "<td>";
echo "<img src='".base_url()."/images/".$product['border='1' align='left'/>";
echo "</td>";
echo "<td>";
echo $product['langoms']."<br/>\n";
echo $product['materiaal_id']."<br/>\n";
echo $product['steen_id']."<br/>\n";
echo $product['afmeting']."<br/>\n";
echo "&euro;" . $product['prijs']."<br/>\n";
echo anchor('webwinkel/winkelwagen/'.$product['id'],'in winkelwagen')."</p>\n";
?&gt;

These are all fields of the table product. Know I would like to use materiaal_id and show in this view the field name of the table materiaal where id = materiaal_id.


Messages In This Thread
Using id to get another field from the table - by El Forum - 12-16-2009, 07:30 AM
Using id to get another field from the table - by El Forum - 12-16-2009, 07:47 AM
Using id to get another field from the table - by El Forum - 12-16-2009, 08:31 AM
Using id to get another field from the table - by El Forum - 12-16-2009, 09:17 AM
Using id to get another field from the table - by El Forum - 12-16-2009, 09:59 AM
Using id to get another field from the table - by El Forum - 12-16-2009, 10:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB