In a query I'm comparing mobile numbers against another (mobile) value in another column.
So far I'm doing this by something like ...WHERE `table_one`.`mobile` != `table_two`.`mobile
The problem is there are identical mobile numbers but separated by different spaces in each of the column ie 07711 123 456 and 07711 123456 therefore returning results when there is a match.
I know how to do this during an update, something like update `table` set number = REPLACE( number, ' ', ''); but I can't see any examples where this is done in the middle of a query. Perhaps doing a check, placing into a MySQL variable, doing the same with the other mobile in the additional column then comparing the two variables?