title: Python SQLite3 Pass Blob GUID from a Result to a Query
body: <p>This is my first post on Stack Overflow, so apologies if I get anything wrong.</p>
  
  <p>I'm fairly new to Python, and I have SQLite3 database which is created by an application I use, therefore I cannot alter the format of the db.</p>
  
  <p>I have two tables, the main one which creates entries and assigns a unique ID in a column of data type GUID. This same GUID is then used in a second table to cross reference the item and store multiple additional entries.</p>
  
  <p>What I need to do, is update one row of the main table, and then update any matching rows in the second table that have matching GUID's.</p>
  
  <p>The problem is how can I pass the Blob value retrieved from the primary result into next query?</p>
  
  <p>Thanks in advance.</p>
  
  <p>Example: In theory I want to achieve the following..</p>
  
  <pre><code>import sqlite3
  conn = sqlite3.connect('db.db')
  
  aCsr = conn.execute("SELECT * from MainTable")
  for aRow in aCsr:
      bQry = "SELECT * from SecondTable WHERE GUID=" + row[16]
      bCsr = conn.execute(bQry)
      for bRow in bCsr:
          print bRow[0]
  
  conn.close()
  </code></pre>