title: Mysql query for only current user
body: <p>I've started using the wpdatatables plugin,
  In the backend it has a place to enter a MySql query for it to create a table.</p>
  
  <p>I have:</p>
  
  <pre><code>SELECT id, currentuserid, text, date_created
  FROM  `1items` 
  WHERE currentuserid = %d
  ORDER BY  `1items`.`currentuserid` 
  </code></pre>
  
  <p>Which lists all the tables I need to pull from the database, however, I am wondering if there is a way to dynamically filter in MySql for only the current user's ID.</p>
  
  <p>In the second column "currentuserid" it pulls all the user's ID's and inputs them into the table. </p>
  
  <p>Example: If I am logged in as user ID 4 - I would like the query to filter out the other users -- as of now, The above query returns tables from all user ID's.</p>
  
  <p>When searching wordpress stackexchange, I located this: <a href="https://stackoverflow.com/questions/23673422/php-mysql-query-return-results-for-current-user-only">PHP MySQL query - return results for current user only</a> 
  Which doesn't work, or I am not using it right with wpdatatables.</p>
  
  <p>Thanks!</p>