if ($listtype) {
$result = mysql_query("SELECT id, profile_type, artist, city, state, points, image, bio, views, enabled FROM artist_profiles WHERE profile_type='$listtype' ORDER BY points DESC",$db); //
} else {
$result = mysql_query("SELECT id, profile_type, artist, city, state, points, image, bio, views, enabled FROM artist_profiles ORDER BY points DESC",$db); //
}
I'm getting an error on this line:
$result = mysql_query("SELECT id, profile_type, artist, city, state, points, image, bio, views, enabled FROM artist_profiles WHERE profile_type='$listtype' ORDER BY points DESC",$db);
i basicly want to retrieve the needed fields from artist_profiles where the profile_type is equal to the type submitted.