[mod_python] How to compare?

python eager python_eager at yahoo.com
Wed Jan 11 00:14:18 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
 Got holiday prints? See all the ways to get quality prints in your hands ASAP.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20060110/8f2575b5/attachment-0001.html


More information about the Mod_python mailing list