title: Right syntax to use near '%d AND IDX = %d'
body: <p>I'm getting the following query error.</p>
  <pre><code>$total = $wpdb-&gt;get_var(&quot;SELECT COUNT(*) FROM tsk_users_ticket_infor WHERE ID = %d AND IDX = %d&quot;, $user_ID , $id);
  </code></pre>
  <p>How would I go about replacing this system, without putting the variables directly in the query?</p>