BestCareAnyLea
BestCareAnyLea8mo ago

Reference component with MySQL

Hello, I've got a MySQL database and want to include the properties of a rangeslider component in my SQL query. The rangeslider has the id h and result[0] is the min value currently selected. My query currently looks like this but it does not work, I have tried different ways of referencing the component. SELECT Product, (Unit_Price - Unit_Cost) AS db FROM FullBike GROUP BY Product, db HAVING db BETWEEN ${h.result[0]} AND ${h.result[1]} ORDER BY db DESC; Is there a way to do this just within the SQL query without an additional script? Thanks in advance
2 Replies
henri-c
henri-c8mo ago
Hi! You can take the component results as input of your MySQL script
BestCareAnyLea
BestCareAnyLeaOP8mo ago
This is exactly what I was looking for, thank you so much!

Did you find this page helpful?