Hi all . i have a mysql database for music information and it has the following fields :


Code:
id ,filename, artist, album, title, remix ,track alternate_name,
parody ,comments, genre, seconds, filesize, bitrate ,visual, url
[b]
I want a query that pulls all albums name for perticuler artist that i ask for. example : singeralbums.php?artist=andy. For each album i want artist name , album name.Furthermore i want a query that pulls all songs for perticuler album and i want these fields for it :id,filename, artist, album,title.Example albumsongs.php?album=star. . I be happy if an expert show me what query produces the result i want.Thanks

feild data type:


code for singeralbums.php?artist=andy
Note : simmiler code for albumsongs.php?album=star but diffrent query.
<?php

$user = "root";
$pw = "";
$db = "mp3sversion5";

$mysql_access = mysql_connect("localhost", $user, $pw);
mysql_select_db($db, $mysql_access);

$query = "?????????????????";
$result = mysql_query($query);



?>
..............
..............html
<?
while($row = mysql_fetch_assoc($result))
{

//echo "<br>Id : {$row['id']} <br>" .
// "filename :{$row['filename']} <br>" .
// "artist : {$row['artist']} <br>" .
// "album : {$row['album']} <br>" .
// "title : {$row['title']} <br><br>";

?>
.........
......... html code for each record in the output set and it is uses above a few of above commented variables

<?


} // end of while

?>