To tables combined to two levels
Could anyone tell me why it do not work with this - supposed to make a two level combination à la this (sorry, but "art" here is Danish for sort!):
portalart1
portalA
portalB
portalart2
portalC
portalart3
portalD
portalE
$result = mysql_query(" SELECT
a.portalart, a.portalart_nr, p.portaladresse_art, p.portaladresse_navn, p.portaladresse_url
FROM portalart AS a, portaladresser AS p
WHERE p.portaladresse_art = a.portalart_nr
ORDER by a.portalart_nr ASC ");
while ( $row = mysql_fetch_row($result) )
{
echo "<tr>";
echo "<td align=\"center\">";
echo "<b>Portalart: " . $row['0'] . "</b>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=\"left\">";
echo "URL og navn: <a href=\"" . $row['4'] . "\">" . $row['3'] . "</a>";
echo "</td>";
echo "</tr>";
}
//tb portalart: id, portalart, portalart_nr
//tb portaladresser: id, portaladresse_art, portaladresse_navn, portaladresse_url
The result is Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource - regarding while...
|