Improve SQL query on check date for period

This commit is contained in:
Cédric Krier
2008-10-15 11:31:52 +02:00
parent 8f8abc66d8
commit 4eaf7351be
+1 -1
View File
@@ -72,7 +72,7 @@ class Period(OSV):
if period.type != 'standard':
continue
cursor.execute('SELECT id ' \
'FROM ' + self._table + ' ' \
'FROM "' + self._table + '" ' \
'WHERE ((start_date <= %s AND end_date >= %s) ' \
'OR (start_date <= %s AND end_date >= %s) ' \
'OR (start_date >= %s AND end_date <= %s)) ' \