Hello guys,
Assuming I have these 2 fields:
I want to make a JS query to resolve the query depending on those dropdown menu.
For example:
let query = SELECT * FROM table1 WHERE 1=1
if (select_campana.value != null) {
let q2 = query + "AND campana = select_campana.value"
} else if (select_conexion != null) {
let q3 = query + "AND conexion = select_conexion.value"
}
// run the query here
How to achieve this thing and then run the query after?