
api.provider().database.listDocuments(databaseId,collectionId, [Query.equal('lesson',id)],[Query.equal('subject',cat)], ); I used this syntax but it is taking only the first condition and ignoring the second; I have kept an key index containing two attributes lesson and subject but the above syntax throw an error as index not found , so i added subject and lesson as separate index but now it is taking only the first query.

I think both queries should be inside on array. Like so
api.provider().database
.listDocuments(databaseId, collectionId,
[
Query.equal('lesson', id),
Query.equal('subject', cat)
]
);
Recommended threads
- Sharing cookies
Hi, I’m using Appwrite Cloud, and I have a setup where my Appwrite backend is hosted on a subdomain (e.g., api.example.com), while my frontend (Next.js app) and...
- Organization not exists anymore
Hello! We have a problem with a cloud database. We are on the Free plan, but after a refresh the site wants me to create a new organisation, and I not see the c...
- JSON and Object Support in Collection do...
I am working with Next.Js and Appwrite Cloud, I am relatively New to Appwrite but i have noticed there is no direct support of JSON and Object support in attrib...
