Forums

Connecting multiple tables help

flyboeing 01 Sep, 2011
Hello,

I am currently working on connecting two tables with eachother to show some information.
I found this topic:
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=12&t=13169&hilit=connect+multiple+table

I first tried the first methode, but because my MYSQL version is 4.1 I can't use the CREATE VIEW thing...
The second method I used and it worked a bit. It only shows 8 records, but I have a list om 50....
Am I doing something wrong?

This is my peace of code:
<?php
//Get Photos
    $db =& JFactory::getDBO();
    $db->setQuery("SELECT icao,airport FROM movements_ewas_airportlist WHERE icao = '$MyRow->dest'");
    $results = $db->loadObjectList();
    foreach($results as $result){
echo "<a class='linkhover' title='$result->airport'>{dest}</a>";
  }
  ?>


Kind regards,
Ruud
GreyHead 01 Sep, 2011
Hi flyboeing,

There's no table name in the query. From memory I think you have to put a lot of the Query in the Where box to get this to work.

Bob
flyboeing 01 Sep, 2011
Hmm I am going to try it, but I think I am going to look for an other solution.
This topic is locked and no more replies can be posted.