Query multiple where clause arguments

Hi

I am needing to return a query of mutliple items - i.e. farmers and
retailers. I have tried this below to no avail..any pointers on how I go
about doing this

var farmerlist = control.query(
'user',
'user_type = ?',
['farmer','retailer']);

Thanks
Andrew

review SQL syntax. you likely want:

user_type in (?, ?)

··· On Thu, Jan 14, 2016 at 5:12 AM, Andrew de Klerk wrote:

Hi

I am needing to return a query of mutliple items - i.e. farmers and
retailers. I have tried this below to no avail..any pointers on how I go
about doing this

var farmerlist = control.query(
'user',
'user_type = ?',
['farmer','retailer']);

Thanks
Andrew

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

thanks mitch

this worked

var farmerlist = control.query(
'users',
'user_type in (?,?)',
['farmer','retailer']);
Andrew

··· On Thursday, 14 January 2016 22:50:18 UTC+2, Mitch Sundt wrote: > > review SQL syntax. you likely want: > > user_type in (?, ?) > > > > On Thu, Jan 14, 2016 at 5:12 AM, Andrew de Klerk <andrew....@gmail.com > wrote: > >> Hi >> >> I am needing to return a query of mutliple items - i.e. farmers and >> retailers. I have tried this below to no avail..any pointers on how I go >> about doing this >> >> var farmerlist = control.query( >> 'user', >> 'user_type = ?', >> ['farmer','retailer']); >> >> Thanks >> Andrew >> >> -- >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "ODK Community" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to opendatakit...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com >