ALTER PROCEDURE [dbo].[sp_select_interest]
( @uid int,
@Type varchar
)
AS
BEGIN
if @Type = 'Music'
begin
select music_liked.uid,music_liked.music_id,music.music_pic from music_liked,music where music_liked.music_id = music.music_id and music_liked.uid = @uid
end
If @Type = 'Movies'
begin
select movies_liked.uid,movies_liked.movies_id,movies.movies_pic from movies_liked,movies where movies_liked.movies_id = movies.movies_id and movies_liked.uid = @uid
end
if @Type = 'Books'
begin
select books_liked.uid,books_liked.books_id,books.books_pic from books_liked,books where books_liked.books_id = books.books_id and books_liked.uid = @uid
end
.
.
END