title: Select where another table is equal to
body: <p>I have a <code>queue</code> table and a <code>photos</code> table, I need to join both of those via the pid(photo id) and then return them if the setting is equal process='1'.</p>
  
  <p>Here is my current command </p>
  
  <pre><code>  SELECT * 
      FROM queue 
      JOIN link ON queue.pid = link.id 
  ORDER BY timestamp DESC
  </code></pre>
  
  <p>...and this returns the photos and queue table combined fine. But my problem is the IF settings process ='1'</p>
  
  <p>Process Table SQL</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `settings` (
    `process` int(11) NOT NULL
  ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `settings`
  --
  
  INSERT INTO `settings` (`process`) VALUES
  (1);
  </code></pre>
  
  <p>Any help?</p>