title: Displaying only logged in user's records
body: <p>I am trying to restrict users records display. Basically i am developing a CRM where a user logs in and enters (orders, quotes...) his data and submits to database. So when a user logs in i want to display only those records which he has entered not others data. For this I take user's <code>session</code> id and stores it infront of his records,</p>
  
  <p>While displaying i am doing like this </p>
  
  <pre><code>"SELECT * FROM orders WHERE user_id='".$_SESIION['userID']."';
  </code></pre>
  
  <p>But i have to do this 'WHERE' for all display function . Instead of that is there any other way i can do this i mean without repetitive <code>WHERE</code>statement?</p>
  
  <p>Please suggest</p>