title: Checking the users is for meeting the requirement on MySQL
body: <p>I'm making an web with point and reward system where user collect points and if users point meet the requirement, user will get a reward and level up.</p>
  
  <p>As example, here's my user table</p>
  
  <pre><code>id | username | level | point
  1  | nameuser | 0     | 0
  </code></pre>
  
  <p>Award : </p>
  
  <pre><code>idaward | awardname | pointreq | badgeid
  1       | LEVEL ONE | 10       | 1
  </code></pre>
  
  <p>and so on, I have 100+ award for user.</p>
  
  <p>Award log </p>
  
  <pre><code>idlog | userid | awardid | badgeid | givendate
  </code></pre>
  
  <p>And my purpose is how to check if user is eligible or meet the requirement to get an award &amp; badge ? </p>
  
  <p>The flow: </p>
  
  <pre><code>Users have a point -&gt; check if user meets the requirement to level up &amp; get award 
  -&gt; Users will leveled up and get a reward (insert the info. to award log)
      If users already have it then ignore it.
  </code></pre>
  
  <p>I'm using Laravel, so if you can make the Laravel query, I will really appreciate it but I will also accept raw MySQL query.</p>
  
  <p>Thank you</p>