title: MySQL: Get result by user name
body: <p>Hi I am trying to get one user profile field value ( donation button code ) by username. Here are the tables</p>
  
  <p><img src="https://i.stack.imgur.com/nLze5.jpg" alt="enter image description here"></p>
  
  <p>As I am not much experienced with MySQL and learning so I tried with few condition but somehow I am unable to understand how to check username with userprofile tables and get donation content.</p>
  
  <pre><code>SELECT ^users.userid, ^users.handle, ^userprofile.title, ^userprofile.content 
  FROM ^users, ^userprofile
  WHERE ^userprofile.userid=^users.handle AND title= 'donation'
  </code></pre>
  
  <p>and trying to get output using <code>echo $donation['content']</code></p>
  
  <p>But of course I know the query statement is not right but now I don't know how to write. Please help me.</p>
  
  <p><strong>Note: ^ is nothing but database prefix</strong></p>