title: Join query using Codeigniter with where condition to return all rows and number of rows
body: <p>we have 2 tables <code>user_details</code> and <code>shipments</code>
  we have to get all the <code>order_id</code> of each user from <code>shipments</code> table where <code>shipment_count</code> in <code>user_details</code> table is less than or equal to <code>4</code> and <code>onb_status</code> !='1' in <code>shipments</code> table</p>
  
  <p><a href="https://i.stack.imgur.com/RvcTN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RvcTN.png" alt="user_details (table)"></a></p>
  
  <p><a href="https://i.stack.imgur.com/J4YQM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J4YQM.png" alt="shipments (table)"></a></p>
  
  <p><a href="https://i.stack.imgur.com/Kw66F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Kw66F.png" alt="output"></a></p>