MySQL Forums
Forum List  »  Connector/Python

How to execute SELECT command with WHERE clause
Posted by: sithari perera
Date: May 22, 2010 10:02PM

I am using Python 3.1 and MySQL 5.0.
My python code is,

cursor.execute("SELECT Gene_name FROM cneviewer WHERE CNE_ID = 'CNS' " )

cneviewer is my database name and I have assigned a value to the variable CNS as,
CNS=sequence.split("_")[0]

When I execute this query it doesnot return any rows. When I print number of rows it says -1.
Can somebody help me pls?

Options: ReplyQuote


Subject
Written By
Posted
How to execute SELECT command with WHERE clause
May 22, 2010 10:02PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.