Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Multiple values for "where" in one database query

Hi,

To search several field values you can use the following syntax:code{"Maker" : {$in: ["Samsung", "Nokia", "Sony"]} }/code
To search in several fields you should use commas:code{"Maker" : {$in: ["Samsung", "Nokia", "Sony"]}, Model: "Galaxy SIII" }/code

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Multiple values for "where" in one database query

Hello,
We have non-relational database therefore this request is impossible yet.

Ryan Rigby
Posts: 0
Joined: Sun Feb 17, 2013 6:57 pm

Multiple values for "where" in one database query

Wow could you answer be anymore useless??

How about a couple suggestions then on how to architect the data in the database

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Multiple values for "where" in one database query

Let's try and stay constructive in this forum.

We use MongoDB in the backend, thus a tradition SQL query will not always work. Here is more information on how to do a query with a pointer: http://docs.tiggzi.com/documentation/...

Ignacio Valdés
Posts: 0
Joined: Wed Dec 11, 2013 7:21 pm

Multiple values for "where" in one database query

I try to do it but does not work for me :(

http://cl.ly/image/3f00140f1e2F

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

Multiple values for "where" in one database query

Hi There,

in a DB field named "countryName", I am looking for the country "Zambia" but I don't want to key all of the Zambia word.

I thought it would work with {"countryName":{"$in":["Zam"]}}
but nothing comes out.

I must have mis understood the operator '$in' .
may I ask you for the proper operator is any ?

many thks in advance,

Eric

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

Multiple values for "where" in one database query

Hi There (again) :-)
forget my question above ... I found the proper operator.
for those who could be interested

{"countryName": { $regex: "Zam" } }

more to find out on

http://docs.mongodb.org/manual/refere...

enjoy your wknd !

Eric

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Multiple values for "where" in one database query

Hello Eric,

Thank you for the update!

Joseph Yeung
Posts: 0
Joined: Tue Aug 14, 2012 7:48 am

Multiple values for "where" in one database query

\""Nokia\""]}} ' "" ; .. data: encodeURI(JSON.stringify(whereClause))

Joseph Yeung
Posts: 0
Joined: Tue Aug 14, 2012 7:48 am

Multiple values for "where" in one database query

\""Nokia\""]}} ' "" ; "

Return to “Issues”