I have the following SQL query and I want to use the character
"?" because the postgres 9.5 syntax requires it, the problem is that codeigniter by default uses that symbol to replace values in the SQL query.
SELECT codigo, descr, ( select count(*) from "mi_tabla_2" where coddoc::jsonb ? codigo and coddep = '100' and codserie = '50' and codsubserie = '25' ) as check FROM "mi_tabla_1" WHERE std = TRUE