domain = '.'.join( host.split('.')[-2:] )

domain = '%' + domain + '%' 
domain = '%%%s%%' % domain 
domain = '%{}%'.format(domain)

cur.execute('''UPDATE visitors SET (pagesID, host, ref, location, useros, 
browser, visits) VALUES (%s, %s, %s, %s, %s, %s, %s) WHERE host LIKE "%s" ''', 
                                                                                
                                                                                
                                                                                
                                        (pID, domain, ref, location, useros, 
browser, lastvisit, domain) )

i just tried both of these 3 ways and the database wrapper failed on all of 
them respectively.

they gave no error_log output though just the usual
ProgrammingError(1064, .....)
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to