I have tryed to make a bit of code for some time now, but i am just to stoopid to be able to.
This is my code:
- Code: Select all
$db = JFactory::getDBO();
$query = "SELECT * FROM lbzi4_users INNER JOIN lbzi4_jvarcade ON lbzi4_users.id=lbzi4_jvarcade.userid where userid=42 order by date DESC LIMIT 5";
$db->setQuery($query);
$rows = $db->loadObjectList();
echo "<div class=\"UserGames\"><h6>" .$nfUser. "'s most recent games:</h6><br>";
echo "<table cellspacing='0' cellpadding='0'>";
foreach ( $rows as $row ) {
$theGameId = $row->gameid;
$query2 = "SELECT * FROM lbzi4_jvarcade_games where id='$theGameId'";
$db->setQuery($query2);
$rows = $db->loadObjectList();
foreach ( $rows as $row ) {
echo $row->gamename;
echo "<br>";
}
}
Its from the line that starts with $query2 thats the problem.
This is only my latest try, and i know its wacked, because it, well... don't work

I am sure you see what i am trying to do here. Help? Please? Someone?


