title: Searching Multiple Tables (SQL)
body: <p>I need to be able to have an SQL query that searches my database using a simple search.  Here is what my tables look like right now:</p>
  
  <pre><code>Table artists
  --------------
  id
  name
  
  Table albums
  -------------
  id
  artistID
  name
  
  Table songs
  ------------
  id
  albumID
  name
  </code></pre>
  
  <p>How would I go about doing this?  Here are some SQL queries that I have tried, but my issue is that it is returning a lot of data.  For instance, if I search for an artist like Snoop Dogg, it is returning a row for each album and song that he has even if they don't contain his name.</p>
  
  <pre><code>SELECT * FROM artist,album,songs WHERE artist.name LIKE '%snoop%' OR albums.name LIKE '%snoop%' OR songs.name LIKE '%snoop%';
  </code></pre>
  
  <p>Edit:</p>
  
  <p>Here is a sample database;</p>
  
  <pre><code>artists
  -----------
  1 | Snoop Dogg
  2 | Linkin Park
  
  albums
  --------
  1 | artist=1 | Boom
  2 | artist=2 | ThisIsIt
  
  songs
  --------
  1 | album=1 | First
  2 | album=2 | Second Linkin
  3 | album=2 | Third
  4 | album=1 | Fourth
  </code></pre>
  
  <p>So I want a search for "snoop" to return just the artist "Snoop Dogg".  But then a search like "Linkin" to return the artist and the song.</p>