useEffect(() => {
fireDb
.child(`All Ride Requests`)
.orderByChild(`car_model`)
.equalTo("Volvo")
// .orderByValue("car_plaka")
// .equalTo("S40")
.on("value", (snapshot) => {
if (snapshot.val() !== null) {
setCar({ ...snapshot.val() });
} else {
setCar({});
}
});
return () => {
setCar({});
};
}, []);
This way I can't assign 2 queries. Is there a way to do this? Is there a way to query data in the same directory?