On 2018-10-02 18:07, Tony van der Hoff wrote:
> On 02/10/18 16:47, Ervin Hegedüs wrote:
>> hi,
>>
>> now rows will looks like this:
>> ({'id':...,...},{'id':...,}...)
>
> Thanks Ervin, but:
>
>cursor = cnx.cursor(pymysql.cursors.DictCursor)
> NameError: name 'pymysql' is not defined
>
> I ha
On 02/10/18 17:13, Larry Martell wrote:
> On Tue, Oct 2, 2018 at 12:09 PM Tony van der Hoff
> wrote:
>>
>> On 02/10/18 16:47, Ervin Hegedüs wrote:
>>> hi,
>>>
>>> now rows will looks like this:
>>> ({'id':...,...},{'id':...,}...)
>>
>> Thanks Ervin, but:
>>
>>cursor = cnx.cursor(pymysql.curso
Hi Tony,
On Tue, Oct 02, 2018 at 05:07:38PM +0100, Tony van der Hoff wrote:
> On 02/10/18 16:47, Ervin Hegedüs wrote:
> > hi,
> >
> > now rows will looks like this:
> > ({'id':...,...},{'id':...,}...)
>
> Thanks Ervin, but:
>
>cursor = cnx.cursor(pymysql.cursors.DictCursor)
> NameError: nam
On Tue, Oct 2, 2018 at 12:09 PM Tony van der Hoff wrote:
>
> On 02/10/18 16:47, Ervin Hegedüs wrote:
> > hi,
> >
> > now rows will looks like this:
> > ({'id':...,...},{'id':...,}...)
>
> Thanks Ervin, but:
>
>cursor = cnx.cursor(pymysql.cursors.DictCursor)
> NameError: name 'pymysql' is not d
On 02/10/18 16:47, Ervin Hegedüs wrote:
> hi,
>
> now rows will looks like this:
> ({'id':...,...},{'id':...,}...)
Thanks Ervin, but:
cursor = cnx.cursor(pymysql.cursors.DictCursor)
NameError: name 'pymysql' is not defined
I have been using the mysql.connector module, which seems to be the
"
On 02/10/18 16:37, Larry Martell wrote:
> On Tue, Oct 2, 2018 at 11:34 AM Tony van der Hoff
> wrote:
>>I would have expected the connector to be able to return a
>> dictionary.
>>
>> Can anyone suggest a better way of doing this?
>
> https://pymysql.readthedocs.io/en/latest/modules/cursors.html#
hi,
On Tue, Oct 02, 2018 at 04:14:45PM +0100, Tony van der Hoff wrote:
> I'm writing a database application, in python 3,5 under Debian9.
>
> My code:
>
> def get_albums(self, parent_id = 0 ):
> cursor = self.cnx.cursor()
cursor = self.cnx.cursor(pymysql.cursors.DictCursor
On Tue, Oct 2, 2018 at 11:34 AM Tony van der Hoff wrote:
>
> I'm writing a database application, in python 3,5 under Debian9.
>
> My code:
>
> def get_albums(self, parent_id = 0 ):
> cursor = self.cnx.cursor()
> sql =( "select"
> "id"
> ",