Re: cur.execute() syntax error [RESOLVED]

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: psycopg(at)postgresql(dot)org
Subject: Re: cur.execute() syntax error [RESOLVED]
Date: 2022-04-04 22:18:07
Message-ID: b0b12711-905-54d5-9221-e2c48360a72e@appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Mon, 4 Apr 2022, Christophe Pettus wrote:

> It looks like the LabelInput constructor includes some code. Did you mean something like:
>
> self.inputs['Contact Type'] = LabelInput(
> ContactDataForm, 'contact_type',)
> # query to fetch data from contacttypes table
> fetch_all = "SELECT * from contacttypes"
> cur.execute(fetch_all)
> # fetching all rows
> rows = cur.fetchall()
> input_class=ttk.Combobox([values = rows])
> input_var=tk.StringVar()
> # get selected value and bind it to a method
> cont_type = self.get() # selected value by mouse click
> con.close()

Christophe,

Sure looks like it.

Thanks,

Rich

In response to

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2022-08-30 16:03:52 Psycopg 3.1 released
Previous Message Christophe Pettus 2022-04-04 22:07:41 Re: cur.execute() syntax error