I have this query in PHP:
DELETE FROM table1
where filename="'.$name.'"
and id=(select id from table2 where cat="'.$category.'")
The problem is that the string $name is without whitespace and the relative field in table1 have them. How can I do this control?
SOLVED
I solved it with MySQL replace() function. Trim() function didn't work.