'
print ''
print "Top 20 callers"
searchstring='''
"
print "
"
#Top categorys
print '%s | ''' cursor.execute("select name,number,count(number) as '# calls' from cid group by number,name order by '# calls' DESC limit 20;") result = cursor.fetchall() for row in result: print "||
",row[0]," | " print searchstring % (row[0], row [0]) print "",row[2]," | " #print "",row[1]," | " print searchstring % (row[1], row [1]) print "
' print '
' #print '
'
print '
'
print ''
print "Last 20 calls"
print '
"
print "
"
if __name__ == "__main__":
main(sys.argv[1:])
%s | " %(row[0]) print "",row[1]," | " #print "",row[2]," | " print searchstring % (row[2], row [2]) #print "",row[3]," | " print searchstring % (row[3], row [3]) print "