Added parameter binding for select function and added transactions.