title: MySQLI Inner Join 2 Tables
body: <p>What am I doing wrong here. I have followed many examples but can't seem to get this working.
  I have 2 tables</p>
  
  <p>Table => users</p>
  
  <pre><code>user_id
  user_name
  user_email
  user_password
  user_country
  user_dobdate
  user_company
  user_code
  user_status
  user_type
  </code></pre>
  
  <p>Table => applications</p>
  
  <pre><code>apply_id
  apply_from
  apply_leave_type
  apply_priority
  apply_start_date
  apply_end_date
  apply_halfday
  apply_contact
  apply_reason
  apply_status
  apply_comment
  apply_dated
  apply_action_date
  </code></pre>
  
  <p>SQLI QUERY</p>
  
  <pre><code>$query = $db-&gt;select("SELECT users.user_id, app.apply_from FROM users INNER JOIN applications ON  users.user_id = app.apply_from WHERE users.user_code='1'");
  $rows = $db-&gt;rows();
  foreach ($rows as $apply){
  $apply_id = $apply['apply_id'];
  $apply_from = $apply['apply_from'];
  </code></pre>
  
  <p>Error Message</p>
  
  <pre><code>Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in xxxxxxxxxxxxxxx line 26
  </code></pre>