[mod_python] How to compare?

Graham Dumpleton grahamd at dscpl.com.au
Wed Jan 11 00:32:03 EST 2006


As I told you when you made your first post, please use the Python DB-SIG
mailing list, or the main comp.lang.python news group for questions about
Oracle DB interfaces for Python. Just because you are using them in the
context of mod_python does not mean they are a mod_python question.
For the Python DB-SIG mailing list see:

  http://mail.python.org/mailman/listinfo/db-sig

For comp.lang.python newgroup, see:

  http://groups.google.com/group/comp.lang.python?hl=en

I'm patient, but you have ignored a couple of suggestions that there are
better places to ask these questions. Keep this up and you are most likely
just going to annoy people and they will stop being nice an answering
your questions.

Graham

python eager wrote ..
> 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.


More information about the Mod_python mailing list