Re: How to format a datetime MySQL database field to local using strftime()

2019-02-26 Thread vergos . nikolas
Actually i just found it has a directive: dictrows: Whether or not to support dict-like access to row objects (default: True). so i just did: plugin = bottle_pymysql.Plugin( dbuser='nikos', dbpass='*', dbname='counters', dictrows=False ) and now it works with indexes as integers not as st

Re: How to format a datetime MySQL database field to local using strftime()

2019-02-26 Thread vergos . nikolas
Τη Τρίτη, 26 Φεβρουαρίου 2019 - 3:26:29 μ.μ. UTC+2, ο χρήστης vergos@gmail.com έγραψε: > Can you help me rewrite this function, which when iam using 'pymysql' > conncector works normally, it does not when iam using 'bottle_pymysql' > > def coalesce( data ): > newdata = [] > seen

Re: How to format a datetime MySQL database field to local using strftime()

2019-02-26 Thread vergos . nikolas
Can you help me rewrite this function, which when iam using 'pymysql' conncector works normally, it does not when iam using 'bottle_pymysql' def coalesce( data ): newdata = [] seen = {} for host, ref, location, useros, browser, visits, hits, downloads, authuser in data:

Re: How to format a datetime MySQL database field to local using strftime()

2019-02-25 Thread DL Neil
On 26/02/19 7:47 AM, Dennis Lee Bieber wrote: On Mon, 25 Feb 2019 13:00:03 -0500, Dennis Lee Bieber declaimed the following: My apologies for the mis-attribution -- due to spam, I tend to filter out @gmail.com posts (the one flaw with Forte Agent -- it only filters news groups on subje

Re: How to format a datetime MySQL database field to local using strftime()

2019-02-24 Thread DL Neil
Vergos, On 25/02/19 11:53 AM, vergos.niko...@gmail.com wrote: Τη Δευτέρα, 25 Φεβρουαρίου 2019 - 12:38:43 π.μ. UTC+2, ο χρήστης vergos@gmail.com έγραψε: Τη Κυριακή, 24 Φεβρουαρίου 2019 - 8:52:03 μ.μ. UTC+2, ο χρήστης DL Neil έγραψε: Vergos, Please provide more information and show how you

Re: How to format a datetime MySQL database field to local using strftime()

2019-02-24 Thread vergos . nikolas
Τη Δευτέρα, 25 Φεβρουαρίου 2019 - 12:38:43 π.μ. UTC+2, ο χρήστης vergos@gmail.com έγραψε: > Τη Κυριακή, 24 Φεβρουαρίου 2019 - 8:52:03 μ.μ. UTC+2, ο χρήστης DL Neil > έγραψε: > > Vergos, > > > > Please provide more information and show how you've debugged the code so > > far... > > > > > >

Re: How to format a datetime MySQL database field to local using strftime()

2019-02-24 Thread vergos . nikolas
Τη Κυριακή, 24 Φεβρουαρίου 2019 - 8:52:03 μ.μ. UTC+2, ο χρήστης DL Neil έγραψε: > Vergos, > > Please provide more information and show how you've debugged the code so > far... > > > On 25/02/19 7:03 AM, vergos.niko...@gmail.com wrote: > > pymydb.execute( '''SELECT host, ref, location, useros, b

Re: How to format a datetime MySQL database field to local using strftime()

2019-02-24 Thread DL Neil
Vergos, Please provide more information and show how you've debugged the code so far... On 25/02/19 7:03 AM, vergos.niko...@gmail.com wrote: pymydb.execute( '''SELECT host, ref, location, useros, browser, visits, hits, downloads, authuser FROM guests

How to format a datetime MySQL database field to local using strftime()

2019-02-24 Thread vergos . nikolas
pymydb.execute( '''SELECT host, ref, location, useros, browser, visits, hits, downloads, authuser FROM guests WHERE pagesID = (SELECT ID FROM pages WHERE url = %s) ORDER BY visits DESC''', page ) data = pymydb.fetchall() for visit in visits: