title: I need a Query with 2 dynamic values
body: <p>i have an array where i can get id's from a database table, now i need to extract those values as i run a domain link array such as: domain.com/page?id=1</p>
  
  <p>Now this page will bring a category, lets say A category with ID 1 i need to list items under this category on the same database table example products, i can use it without a filter now i need a filter using arrays, here is my code, thank you in advance.</p>
  
  <pre><code>$query ="SELECT * FROM tablename WHERE id = '".$id."' DESC";
  </code></pre>
  
  <p>before this i have on my php code:</p>
  
  <pre><code>$id = $_GET["id"];
  </code></pre>
  
  <p>So when i call from this table all comes out, but i need to filter where category 1 (example) have items, not all items with category 2, 3, 4 etc. </p>
  
  <p>With my code i can get the item id as the link with array works fine for example: domain.com/page.php?id=1, but here is the catch, i get item id 1 and i need let's say category id 2, if i run the same link with id=2 i get item id 2 and that's not what i want.</p>
  
  <p>I need to retrieve those values as arrays, any idea? Thank you in advance!</p>
  
  <p>EDITED</p>
  
  <p>Table structure example:</p>
  
  <p>Items
  ID, Name, Category</p>
  
  <p>I need Category from Items as a filter like this: domain.com/?id=2&amp;category=2</p>
  
  <p>So i get all items under row Category only</p>