 <p>You should just join tables <br></p> <pre><code>SELECT * FROM `affiliate_information` a_i LEFT JOIN `affiliate_tasks` a_t ON a_i.`username` = a_t.`username` WHERE a_i.`username` = 'SomeUsername' </code></pre>