Frank Millman schrieb:
> If you want it to handle a variable number of values, you will have to
> programmatically construct the sql statement with the appropriate
> number of parameters.
>>> vals = (1,2,3,4,5)
>>> sql = "select * from table where value in ("+','.join("?"*len(vals))+")"
>>> print sql
'select * from table where value in (?,?,?,?,?)'

cheers
 Paul

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to