[mod_python] error occur while comparing

python eager python_eager at yahoo.com
Thu Jan 12 05:39:41 EST 2006


  Hi ,
      here  i am comparing both the values of form value and table value. But it will not work . The result will be print "not equal". Table values are retrieved fine. Here what mistake i did. No compilation error and run time error. Please solve this problem.
   
  Code Snippet :
   
            req = self.request()
          pid = int(req.field('pid'))
          self.writeln(pid)
         
            dbconnection = cx_Oracle.connect("myusername", "mypassword", "mydatabase")
          cursor = dbconnection.cursor()
          cursor.arraysize = 50
          cursor.execute("SELECT PID FROM PERSONALDETAILS order by pid")
          for PID in cursor.fetchall():
             # Comparing here both formvalue and table value ( both are numeric)              
              if pid==PID:
                  self.writeln("Equal")
              else:
                  self.writeln("Not Equal")
   
  Thank you
  Python_Eager


		
---------------------------------
Yahoo! Photos – Showcase holiday pictures in hardcover
 Photo Books. You design it and we’ll bind it!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20060112/3c78124d/attachment.html


More information about the Mod_python mailing list