Re: [sqlite] Question about binding

2013-04-28 Thread Igor Korot
; () ascii ribbon campaign against html e-mail > /\ www.asciiribbon.org > > > > -Original Message- > > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > > boun...@sqlite.org] On Behalf Of Igor Korot > > Sent: Sunday, 28 April, 2013 14:53 >

Re: [sqlite] Question about binding

2013-04-28 Thread Keith Medcalf
> Sent: Sunday, 28 April, 2013 14:53 > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Question about binding > > Hi, Keith, > > On Sun, Apr 28, 2013 at 12:34 PM, Keith Medcalf <kmedc...@dessus.com> > wrote: > > > > > http://ww

Re: [sqlite] Question about binding

2013-04-28 Thread Igor Korot
Hi, Keith, On Sun, Apr 28, 2013 at 12:34 PM, Keith Medcalf wrote: > > http://www.sqlite.org/lang_expr.html#varparam > > They are what are called Named Parameters. You use the > sqlite3_bind_parameter_index to look up the index associated with a name ... > > ?nnn simply

Re: [sqlite] Question about binding

2013-04-28 Thread Keith Medcalf
http://www.sqlite.org/lang_expr.html#varparam They are what are called Named Parameters. You use the sqlite3_bind_parameter_index to look up the index associated with a name ... ?nnn simply means to use index nnn for that parameter. Subsequent bare ? parameter indexes are incremented by 1

Re: [sqlite] Question about binding

2010-03-24 Thread Vance E. Neff
Thanks Pavel! Vance Pavel Ivanov wrote: >> Is there documentation that talks about about the various binding place >> holders or is this a standard SQL construct? > > Probably this will help you: http://www.sqlite.org/c3ref/bind_blob.html. > > > Pavel > > On Tue, Mar 23, 2010 at 3:48 PM,

Re: [sqlite] Question about binding

2010-03-24 Thread Adam DeVita
1rex2...@yahoo.com> wrote: > >* :VVV > >* @VVV > >* $VVV > > Are above bindings the same? (Just different prefix to VVV)? > > Thank you, > > Samuel > > > > From: Pavel Ivanov <paiva...@gmail.com>

Re: [sqlite] Question about binding

2010-03-24 Thread Pavel Ivanov
vel Ivanov <paiva...@gmail.com> > To: General Discussion of SQLite Database <sqlite-users@sqlite.org> > Sent: Wed, March 24, 2010 2:16:34 PM > Subject: Re: [sqlite] Question about binding > >> Is there documentation that talks about about the various binding place

Re: [sqlite] Question about binding

2010-03-24 Thread a1rex
0 2:16:34 PM Subject: Re: [sqlite] Question about binding > Is there documentation that talks about about the various binding place > holders or is this a standard SQL construct? Probably this will help you: http://www.sqlite.org/c3ref/bind_blob.html. Pavel On Tue, Mar 23, 2010 at 3:48 PM,

Re: [sqlite] Question about binding

2010-03-24 Thread Pavel Ivanov
> Is there documentation that talks about about the various binding place > holders or is this a standard SQL construct? Probably this will help you: http://www.sqlite.org/c3ref/bind_blob.html. Pavel On Tue, Mar 23, 2010 at 3:48 PM, Vance E. Neff wrote: > Thanks to all

Re: [sqlite] Question about binding

2010-03-23 Thread Vance E. Neff
Thanks to all those who responded! It was quite educational. I'm using the zentus java jdbc wrapper. It seems to only support an index # for the binding index so I'm stuck with being careful as to how I count ?s. Is there documentation that talks about about the various binding place holders

Re: [sqlite] Question about binding

2010-03-19 Thread D. Richard Hipp
On Mar 19, 2010, at 3:29 PM, David Bicking wrote: > > > --- On Fri, 3/19/10, Vance E. Neff wrote: > > >> 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

Re: [sqlite] Question about binding

2010-03-19 Thread David Bicking
--- On Fri, 3/19/10, Vance E. Neff wrote: > 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 > You count the question marks from left to

Re: [sqlite] Question about binding

2010-03-19 Thread Jay A. Kreibich
On Fri, Mar 19, 2010 at 03:13:19PM -0400, Vance E. Neff scratched on the wall: > 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

Re: [sqlite] Question about binding

2010-03-19 Thread Pavel Ivanov
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