From: Chuck B. <cfb...@gm...> - 2004-11-29 16:17:18
|
On Sun, 28 Nov 2004 10:42:12 +0100, Karsten Hilbert <kar...@gm...> wrote: [...] > The query arguments are intended to be values for the *where* > clause, no ? I am inclined to agree with Karsten that query arguments are for the WHERE clause. To insert the names of columns to be retrieved into a SELECT statement at runtime, I would use Python string formatting and a helper function that returns a tuple of days of the week: def daysOfWeek(): <build list 'L' with range of days> return tuple(L) [...] cur.excute("Select %s from table" % (daysOfWeek())) Chuck |