Follow us Question: setWhereClause

Hi,

I have a follow up question of [this question]. Can I set multiple where clauses?

Regards
Rhonwen

I see I can put an extended string.

When I put in the following:

builder.setWhereClause("email != '" + Backendless.UserService.CurrentUser().getEmail() + "'" + "AND staffType = 'Default

…It does not work.

I tried to repeat the where clause.

See code below:

builder.setWhereClause("email != '" + Backendless.UserService.CurrentUser().getEmail() + "'");
builder.setWhereClause("accepted = '" + query + "'");

…does not work. gets overridden by last where clause

You can assign only one where clause. Your whereClause may contain AND/OR logical operators to have multiple conditions, but there must be only one whereClause query statement.

Regards,
Mark

I did that and it did not work, But I sorted it out with an if statement. No need for multiple conditions in the where clause anymore.

Thank you for the Help. Maybe I did something wrong. It is quite possible since I worked through the night on my app.

Kind Regards
Rhonwen

I missed a single quotation after 'DEFAULT ’ and a space before the ‘AND’ operator.