I have this query
SELECT
ID_ESTRUC_PRESUP, AN_FISCAL, CO_PROY_INST, CO_ACC_INST, CO_UNIDAD, CO_PROY_OPER,
CO_ACC_OPER, CO_FUENTE, CO_GASTO, CO_GENERO, CO_CONDICION, CO_CUENTA_PRESUP,
CO_SNC, $co_mes
FROM
sialuz5db.dbo.VW_SALDO_DISP_SAPP_M002_V003
WHERE
AN_FISCAL = $an_fiscal AND
CO_UNIDAD= $co_unidad
AND LEFT(CO_CUENTA_PRESUP,3)= '$co_cuenta_presup'
AND CO_FUENTE = $co_fuente
ORDER BY
AN_FISCAL,
CO_PROY_INST,
CO_ACC_INST,
CO_UNIDAD,
CO_PROY_OPER,
CO_ACC_OPER,
CO_FUENTE,
CO_GASTO,
CO_GENERO,
CO_CONDICION,
CO_CUENTA_PRESUP,
CO_SNC ";
She brings me all that is shown in the where but I also want that variable $ co_mes to filter the search by month.
In the view I have several select2 where you select what you need and at the end there is a select2 where are the months when you give me should filter and show me all the row's of each thing but if there is no availability show N / A in the Row of Month if there is availability leave the Month. those php validations I already have problems with is with the query.