Commits

Ben Luo committed 56fc796

tmp

Comments (0)

Files changed (1)

  #   for row in rows:
  #       print row[0]#, row[1]
 
+def selectjiajianSanzhongxin (selectrows,numbermax=10):
+    sqlselect = 'SELECT formulation FROM tiku where result<='+str(summax)+' and operator1="+" and operator2 is null and operation1>0 and operation2>0 ORDER BY RANDOM() LIMIT '+str(selectrows)+';'
+    cur = db.cursor()
+    cur.execute(sqlselect)
+    rows = cur.fetchall()
+    return rows
+
+def selectjiaSanzhongxin (selectrows,numbermax=10):
+    pass
+
+def selectjianSanzhongxin (selectrows,numbermax=10):
+    pass
+
         
 if __name__ == "__main__":
 
     # selectxxx(rows, sumary_max)
-    jia = selectjia(50, 100)
-    jian = selectjian(40,100)
-    jiajian = selectjiajian(10,100)
+#    jia = selectjia(50, 100)
+#    jian = selectjian(40,100)
+#    jiajian = selectjiajian(10,100)
     #selectjian(20)
+
+    jia = selectjiaSanzhongxin(50,100)
+    jian = selectjianSanzhongxin(40,100)
+    jiajian = selectjiajianSanzhongxin(10,100)
     
     timus = jia + jian + jiajian
     random.shuffle(timus)