title: SQL / PHP How to pull data from a table and place it in variable
body: <p>Assuming I have a uniqid key in my table and that same key is sent to my site in a get method, how do I pull that specific key out and assign all the data from the table to variables. This is what I have so far but cant seem to figure it out.</p>
  
  <pre><code>$query1 = "SELECT * 
         FROM todo_item2 as ti INNER JOIN todo_category2 as tc ON ti.todo_id = tc.todo_id'
         WHERE todo_id = :todo_id";
  
  $statement1 = $db-&gt;prepare($query1);
  $statement1 -&gt; execute(array(
      'todo_id' =&gt;$id
  ));
  
  while ($row = $statement1-&gt;fetch()) 
  {
      $text = $row['todo'];
      $cat = $row['category'];
      $percent = $row['precent'];
      $date = $row['due_date'];
  }
  </code></pre>