Subversion Repositories SmartDukaan

Rev

Rev 2083 | Rev 2153 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2083 Rev 2135
Line 144... Line 144...
144
 
144
 
145
  def loadSearchStringsFromDb(self):
145
  def loadSearchStringsFromDb(self):
146
    conn = self.getDbConnection()
146
    conn = self.getDbConnection()
147
    
147
    
148
    # Prepare SQL query to INSERT a record into the database.
148
    # Prepare SQL query to INSERT a record into the database.
149
    sql = "SELECT query FROM query where is_active = 1"
149
    # sql = "SELECT query FROM query where is_active = 1"
-
 
150
    sql = "SELECT * FROM query where is_active = 1 and id%2 = dayofweek(now())%2"
150
    try:
151
    try:
151
      # prepare a cursor object using cursor() method
152
      # prepare a cursor object using cursor() method
152
      cursor = conn.cursor()
153
      cursor = conn.cursor()
153
      # Execute the SQL command
154
      # Execute the SQL command
154
      cursor.execute(sql)
155
      cursor.execute(sql)