I have this statement:
$nova = (explode('/', implode('/', $_GET['tipo'])));
What results in this array:
Array
(
[0] => CONJUNTO
[1] => SALA
[2] => LOJA
)
When I do this query in my database ...
$sql = "SELECT * FROM imovel WHERE CATEGORIA IN ('".implode("','", $nova)."')";
... it only returns me the results of LOJA
and I know why, because CONJUNTO
and SALA
are inside a single string, like this: CONJUNTO/SALA
, then how it looks for the statement Exact does not bring me these results.
One of the SQL statements allows me to also bring results containing these indexes by approximate comparison which in this case will be perfect.
Help me apply this statement to this $sql
??