Problem Executing Query from python script

Hi to all.

From PostgreSQL prompt:

mettust=# select * from sales;

mettust=# select * from sales offset(select count(*)-3 from sales);

From terminal:

python code:

output of the code:

Mistake : Hello Friends i committed simple mistake in the python code i forget to use the fetchall() method


cur.execute(“””select * from sales offset(select count(*)%d from sales);”””%self.cou)
print disp
Like this. Hope hereafter i wont commit mistakes like this.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s