Hello everyone i hope you can help me.
I have the following 2 tables.
albums: AlbumID, GenreID, AlbumTitle, AlbumAuthor, NumberOfSongs, Price, Rating.
rating: ratid(1,2,3,4,5 ) which is a primary key,rating(bad, ok,medium,good, great).
And here is the code for a page which is set up to give reults from these two tables:
Where $row[6] is Rating from albums which is showing me a number.
I want instead of the number to show the string from the rating table.
I hope i was clear enough.
Thanks in advance
I have the following 2 tables.
albums: AlbumID, GenreID, AlbumTitle, AlbumAuthor, NumberOfSongs, Price, Rating.
rating: ratid(1,2,3,4,5 ) which is a primary key,rating(bad, ok,medium,good, great).
And here is the code for a page which is set up to give reults from these two tables:
Code:
<?php
include("db.php");
$mts=$_GET["mts"];
$Field=$_GET["Field"];
$query="SELECT * from albums WHERE $Field like '%$mts%'";
$res2=mysql_query($query);
while($row=mysql_fetch_row($res2))
{
echo "<table class=bottom_addr border=1 align=center cellpadding=30 cellspacing=4>";
echo "<tr>";
echo "<td width=50% align=center>"; echo $row[3]; echo "</td>";
echo "<td width=50% align=center>"; echo $row[2]; echo "</td>";
echo "<td width=50% align=center>"; echo $row[5]; echo " Euro"; echo "</td>";
echo "<td width=50% align=center>"; echo $row[1]; echo "</td>";
echo "<td width=50% align=center>"; echo $row[6]; echo "</td>";
echo "</tr>";
echo "</table>";
}
?>
I want instead of the number to show the string from the rating table.
I hope i was clear enough.
Thanks in advance
Comment