4
I don't use the AMS module, but it's relatively easy to with an sql query.
let's say a database table 'joints' with 'country', 'hotel', 'restaurant' rows.
you want to look up all hotels in Brazil, you do:
...
echo "
BRAZIL |
";
$result = mysql_query("SELECT hotel FROM ".$xoopsDB->prefix("joints")." WHERE country='BRAZIL'");
while($row = mysql_fetch_array($result))
{
$hotel = mysql_result($result, "hotel");
echo "$hotel";
}
...
you want to look up all hotels in all countries, you do:
...
$result = mysql_query("SELECT * FROM ".$xoopsDB->prefix("joints").");
while($row = mysql_fetch_array($result))
{
$country = mysql_result($result, "country");
$hotel = mysql_result($result, "hotel");
echo "$country";
echo "$hotel";
}
...
this code seq may have bugs in it.