Skip to content
Advertisement

Output always gives []

I am trying to filter some data by “averageRating”.

This is my code for the method:

My sql statement is working when I test it against my database. However, I keep getting [] as my result. Can someone please help identify what the problem is? Thanks a lot!

Advertisement

Answer

the problem is that “?” since the db is unable to parse it.

either add that avarageRating variable like so:

or if you’re using couchbase you could parse it like this:

where $1 is the first variable in the array of variables.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement