Re: cur.execute() syntax error [RESOLVED] - Mailing list psycopg

From Rich Shepard
Subject Re: cur.execute() syntax error [RESOLVED]
Date
Msg-id b0b12711-905-54d5-9221-e2c48360a72e@appl-ecosys.com
Whole thread Raw
In response to Re: cur.execute() syntax error  (Christophe Pettus <xof@thebuild.com>)
List 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



psycopg by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: cur.execute() syntax error
Next
From: Daniele Varrazzo
Date:
Subject: Psycopg 3.1 released