So I have a data table that has numerical columns named "min" and "max." I'm using it for volume pricing data, so a row might have a min of 100 and a max of 499. Another row is min 500 max 999.
If I try to do a query on it where I specify .ge("min",x) and .le("max",x) where x is any number, it returns 0 results. If I do just a .ge("min",x) or .le("max",x) it works. If I do .eq("min",100) and .eq("max",499) it works.
Basically, I can't seem to combine a .ge and .le on the two fields.
I can also chain any number of .eq with a .ge or .le. I just can't chain the ge and le.
What am I missing here?
Hi Joseph,
It is possible to combine ge and le with two fields.
What does c equals to ?
Roi
My code:
wixData.query("prices")
.ge("min",c)
.le("max",c)
.find()
.then( (results) => {
console.log(results);
} );