I have the following select:
SELECT linha._id,
linha.numero_onibus,
linha.nome,
percurso.nome
FROM linha
INNER JOIN percurso ON linha._id = percurso.id_linha
AND (linha.numero_onibus LIKE ? OR linha.nome LIKE ?) COLLATE NOCASE
When the linha.numero_onibus LIKE ?
condition is false, the query returns no results. What do I have to do so that even if the linha.numero_onibus LIKE ?
condition is false, it proceeds with the query and returns me the results of linha.nome LIKE ?
?