
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
- Auth Error
"use client"; import { useEffect } from "react"; import { getSessionCookie } from "@/actions/auth"; import { createBrowserSessionClient } from "@/lib/appwrite-...
- Prevent modifying specific attributes
How do I prevent user to only to be able to modify some of the attributes. Document level security gives full access to update whole document, what are the wor...
- Bypass Error When Creating Account With ...
Suppose user first uses email/pass for log in using xyz@gmail.com, few month later on decides to use google oauth2 with same xyz@gmail.com (or in reverse orde...
