Hey all. Here's my script:
<?
//Get the album id.
$id = $_GET['id'];
//Retrieve album information and tracklist.
$q = "SELECT `songs.id`, `songs.track_number`, `songs.track_name`, `albums.large_cover`, `albums.name`, `albums.credits`, `albums.release_date`, `albums.label` FROM `songs`, `albums` WHERE albums.id = '$id' AND songs.album = '$id'";
echo $q;
$r = mysql_query($q);
$songs = mysql_fetch_assoc($r);
$total_songs = mysql_num_rows($songs['id']);
echo $total_songs;
But I don't any results even though there are records in the database. When I check the mysql_error(). It gives me "Unknown colum 'songs.id' in field set. But id is the primary key in the songs table so I know it exists. Any thoughts?
TIA