Hi Barry

> $query = "SELECT * FROM xoops_album,xoops_artist WHERE
> xoops_album.artist_id = xoops_artist.artist_id";

If you only need two fields, it is not necessary to retrieve all
fields

$query = "SELECT  xoops_album.album, xoops_artist.artist
FROM xoops_album, xoops_artist
WHERE xoops_album.artist_id = xoops_artist.artist_id";

$albumby = mysql_query($query) or die("Select Failed!");


Your resultset contains then the only two required fields.

echo"<td><center>";
if (mysql_num_rows($albumr)) {
    while ($album = mysql_fetch_array($albumr))   {
        echo "$album[album] <i>by $album[artist] </i><br>";   // new
line
    }
   echo "</center></td>";
 }

Hope it helps
Conni



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to