You can do it like this:

UPDATE table1 set col1 = ?, col2 = ?, col3 = ?
WHERE col1=? and col2=?;

And don't confuse indexes of columns and indexes of parameters. To
mention indexes of parameters explicitly I'd suggest to do it like
this:

UPDATE table1 set col1 = ?1, col2 = ?2, col3 = ?3
WHERE col1=?4 and col2=?5;


Pavel

On Fri, Mar 19, 2010 at 3:13 PM, Vance E. Neff <ven...@intouchmi.com> wrote:
> First of all, I apologize for hijacking the thread!  I did not intend
> to, I just screwed up!
>
> Second:
> Question about binding:
>
> I know how to prepare an INSERT state, for example:
> INSERT into table1 values (?, ?, ?);
> and in the wrapper I am using I can specify the index # (1, 2 or 3) of
> the column and the value in order to set the values.
>
> The question is:
> How to do this with an update statement?  Is there a way to specify the
> index of the columns used in the where clause?  Such as:
> UPDATE table1 set (?, ?, ?) WHERE col1=? and col2=?;
>
> I've never used binding before but have known it is a good idea in order
> to avoid injection of bad stuff.
>
> Vance
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to