Echoing out data from a different table?
Posted: Tue Dec 01, 2009 3:28 pm
In my database in MyPHPAdmin, I have data that is identified with ID numbers through seperate tables, in my case my the column in my table is called 'Company' and it then leads through the 'tbl_Company' and all the proper data along with its corresponding ID is stored in that table.
When I echo out the data however, it shows up as it's ID number.
When i call out the table it looks like this:
and these are what my echos look like, in my case Company and Type are appearing as their ID numbers:
What I'd like to know is how do i have that data show up as the data from the external table "tbl_Company' rather than the "tbl_merchandise"
Many Thanks!
Should i be putting another level
When I echo out the data however, it shows up as it's ID number.
When i call out the table it looks like this:
Code: Select all
$query = "SELECT * FROM tbl_merchandise";
$result = mysqli_query($dbc, $query);
Code: Select all
while ($row = mysqli_fetch_assoc($result)) {
echo ('<a href="'. $row['Product_URL'] . '">' . '<img src=' . '"' . $row["Thumb_URL"] . '"' . '">' . '</a>' . '<br />');
echo $row["Name"] , ('<br />');
echo ('by: ') , $row["Company"] , ('<br />');
echo $row['Type'] , ('<br />');
echo ('In Stock: ') , $row["Stock"] , ('<br />');
echo $row["Price"] , (' CDN'), ('<br />');
echo ('<br />');Many Thanks!
Should i be putting another level