1
I have this instruction:
$nova = (explode('/', implode('/', $_GET['tipo'])));
Which 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 returns me only the results of LOJA
and I know why, for the reason that CONJUNTO
and SALA
are within a single string, so: CONJUNTO/SALA
, then as he seeks instruction exact does not bring me these results.
One of the SQL statements allows it to also bring me results containing these indexes by approximate comparison that for this case will be perfect.
Help me apply this instruction to that $sql
??
One step is to define this "approximate".
– Motta