title: web2py - Extract value from row object and store in variable
body: <p>I am writing a simple web2py application and can't seem to figure out how to run comparison checks on variables from db.select statements. Code is posted below:</p>
  
  <pre><code>form = FORM('Enter Member ID: ', INPUT(_type='text', _name='name'),
             INPUT(_type='submit', _value='submit'))
  
  if form.accepts(request, session):
      member_id= form.vars.name
      measure_1 = db(db.Detailed_Info.MEMBER_NBR==form.vars.name).select(db.Detailed_Info.MEASURE_1)
      measure_2 = db(db.Detailed_Info.MEMBER_NBR==form.vars.name).select(db.Detailed_Info.MEASURE_2)
      response.flash = 'Form Accepted'
  
  
  if measure_1=='DBD':
     test = 'IT WORKED'
  else: 
     test = 'IT DIDNT WORK'
  
  return dict(form=form, test=test)
  </code></pre>
  
  <p>My question is, I am able to see that the value from the first select statement (that defines variable measure_1) is in fact 'DBD'. But the if statement conditional at the bottom isn't working. I feel it's because the result of the select statement is a "row" object. Is there a way to extract the actual value?</p>
  
  <p>Thank you!</p>