If in mysql I have string `xxx yyy` - how can I SELECT this if user input `xxxyyy`?
Replace space and compare:
... where replace('xxx yyy',' ','') = 'xxxyyy'

or generally it can be: ... where replace(column,' ','') = 'xxxyyy'

But not that this may not like your indexes on the columns.