title: sql select is returning the same set of rows multiple times
body: <p>I'm working with the query and it's showing the same rows multiple times, just alternating between two.  I tested selecting every column from all mentioned tables and don't see differences between the rows.  Note that there should be only two returned rows, and I'm getting over 10.  </p>
  
  <p>I think this has something to do with joining the mlc table with the trv table, but I'm stuck on how to fix it.  Any help is appreciated.  Thanks.</p>
  
  <pre><code>SELECT mlc.click_amount AS memPayout
          FROM tbl_trackvalue AS trv, tbl_tracking AS t, tbl_offers AS off, tblusers AS usr, tbl_mailchimp_trackvalue as mlc
          WHERE mlc.tracking_id = trv.tracking_id
                AND off.id = t.offer_id
                AND off.offer_type = 'mailchimp'
                AND usr.id = trv.tr_user_id
                AND trv.tr_user_id =1454
                AND mlc.requested_date = '2014-01-21'
                AND mlc.payment_status = 'pending'
                AND mlc.requested_status = 'declined'
  </code></pre>
  
  <p>UPDATED CODE:</p>
  
  <pre><code>SELECT mlc.click_amount AS memPayout
                                          FROM tbl_trackvalue AS trv, tbl_offers AS off, tbl_mailchimp_trackvalue as mlc
                                          WHERE mlc.tracking_id = trv.tracking_id
                                          AND off.id = trv.tr_offer_id
                                          AND off.offer_type = 'mailchimp'
                                          AND trv.tr_user_id =1454
                                          AND mlc.requested_date = '2014-01-21'
                                          AND mlc.payment_status = 'pending'
                                          AND mlc.requested_status = 'declined'
  </code></pre>
  
  <p>UPDATE II (Changed again, this time it works.  Thanks for the help.  I'm very new, and realizing now the importance of being explicit with naming joins:</p>
  
  <pre><code>SELECT mlc.click_amount AS memPayout
      FROM  tbl_mailchimp_trackvalue as mlc inner join tbl_trackvalue AS trv on mlc.tracking_id=trv.tracking_id
      WHERE trv.type = 'mailchimp'
      AND trv.tr_user_id =1454
      AND mlc.requested_date = '2014-01-21'
      AND mlc.payment_status = 'pending'
      AND mlc.requested_status = 'declined'
  </code></pre>