Dear list, I'd like to be able to pass a collection of key/value pairs to a method and have soci construct a safe SQL WHERE statement with bound parameters.
>From the documentation (and my experimentation), I see that the use() helper takes a vector but not in such as way as to accomplish this. It seems to be to re-use the same sql multiple times for each vector item rather than spread the vector over the statement like multiple calls to use() What I would like to do is have say: SELECT * FROM sometable WHERE foo = 1 and bar = 2; Where I would with soci be able to do: db << "SELECT * FROM sometable WHERE foo = :foo and bar = :bar", use(my_vector); where my_vector contains "1", "2". Can someone more experienced than me with soci offer the best way of doing this? Thanks, Brad ------------------------------------------------------------------------------ Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS and more. Get SQL Server skills now (including 2012) with LearnDevNow - 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only - learn more at: http://p.sf.net/sfu/learnmore_122512 _______________________________________________ soci-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/soci-users
