Helsen
Posts: 0
Joined: Wed Jul 31, 2013 1:42 pm

How to query with constraint with “like” SQL way?

Hello,

I have a Collection called FRIENDS with two fields: Name | LastName

If app user search names and type: < maria I want get all names that contains maria inside, for example, I want expect:

  • maria

  • mariana

  • mariano

  • anamaria

    in SQL database, I will use:
    SELECT Name, LastName from FRIENDS where Name like '%maria%', how can I do this with appery.io backend services?

    Thanks

Helsen
Posts: 0
Joined: Wed Jul 31, 2013 1:42 pm

How to query with constraint with “like” SQL way?

Thanks Max,

my where works nice in this way:

where: {"Name":{"$regex":"maria", "$options":"i"}}

Return to “Issues”