title: sql both ALTER and INSERT with same python placeholder
body: <p>I would like to parse a xml document with python and create a database out of it (using sqlite3).</p>
  
  <p>The xml.tag will create rows, the xml.text will be the data in the row.</p>
  
  <p>The xml (part of it) : </p>
  
  <pre><code>&lt;intrants&gt;
  &lt;PPPs&gt;
  &lt;PPP&gt;
  &lt;titulaire ref-type="firme-titulaire" ref id="20110427000619000001"&gt;DUPONT SOLUTIONS (FRANCE) S.A.S.&lt;/titulaire&gt;
  &lt;type-produit&gt;PPP&lt;/type-produit&gt;
  &lt;etat-produit&gt;AUTORISE&lt;/etat-produit&gt;
  &lt;numero-AMM&gt;9600509&lt;/numero-AMM&gt;
  </code></pre>
  
  <p>The code :</p>
  
  <pre><code>import xml.etree.ElementTree as ET
  import sqlite3
  
  conn = sqlite3.connect("PPPsdb.sqlite")
  cur = conn.cursor()
  
  cur.executescript('''
  CREATE TABLE IF NOT EXISTS PPP (
      id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE);
  ''')
  
  fname = "C:blablabla.xml"
  
  tree = ET.parse(fname)
  
  root = tree.getroot()
  
  all = root.findall('intrants/PPPs/PPP/') 
  
  if one.find(".//") is None :
      if one.find(".").text is not None : print one.find(".").text, len(one.find(".").text)
  
      try :
          print one.tag.replace("-", "_")
          print one.text
  
          cur.execute(''' 
              ALTER TABLE PPP ADD COLUMN ''' + (one.tag.replace("-", "_")))
  
  
          cur.execute(''' INSERT OR IGNORE INTO PPP (titulaire)
              VALUES ( ? )''', (one.text,))
  
      except : 
          continue
  
  conn.commit()
  </code></pre>
  
  <p>This code does not work but it runs (no traceback).</p>
  
  <p>I would like the placeholder to assign values to both the column title and its very own data. </p>
  
  <p>For extra info, this code is only supposed to run if the column to be created does not already exists (but that is not the purpose of this post).</p>