Support Topics Documentation Slack YouTube Blog

Can we query multiple property

I have an object which contains many properties and i want to fetch the value by applying some conditions like the properties are name , date , year , jobTime

Now i want to fetch the jobTime when year = 2019 and name = “saad”
How can i do that , the documentation says

String whereClause = "age = 47";
DataQueryBuilder queryBuilder = DataQueryBuilder.create();
queryBuilder.setWhereClause( whereClause );

in whereClause there i one request
can we get data based on 2 or 3 request like

String whereClause = "name = "Saad" && year = 2019"

Thanks

Hello @Saad_Zahoor1

Yes,

String whereClause = "name = 'Saad' && age = 33";

or

String whereClause = "name = 'Saad' and age = 33";

https://backendless.com/docs/android/data_search_with_where_clause.html -
Just like in SQL, columns can be combined in a single where clause. The following condition would retrieve all objects containing letter J in the name and the age column’s value is greater than 20:

name LIKE 'J%' and age > 20