I am currently running this query inside MySQL to check if the specified values exists
within the table associated with them.
SELECT COUNT(artist.artist_id), COUNT(album.album_id), COUNT(tracks.track_id)
FROM artist, album, tracks WHERE artist.artist_id = 320295 OR album.album_id = 1234 OR tracks.track_id = 809
What you do here is a join over three tables. You can see what happens, when you look at this SQL Fiddle.
In the first select, I have left out the
count, to show how the join works. You can also see how the result set changes, when you modify the where clause from
and as @RayPaseur suggested.
I guess, what you want, is really three separate queries
select 'artist' as type, count(artist_id) as count from artist where artist_id = 320295 union select 'album', count(album_id) from album where album_id = 1234 union select 'track', count(track_id) from tracks where track_id = 809
TYPE COUNT artist 1 album 1 track 1
Now, when you change
track_id = 809 to
track_id = 802, you will get
TYPE COUNT artist 1 album 1 track 0
as a result.
SQL Fiddle for playing.