I have 2 tables in my database. Both tables have a field called listing_key
. In one table if I open phpMyAdmin I can go to search and select a distinct row based on a query similar to the following:
SELECT * FROM properties WHERE listing_key='MYLISTINGKEY'
That query returns the expected result and all is well
The second table only has 2 fields... an AI id
field and the same listing_key
field.
If I run the same query on the second table if returns no result. However, and there is where it gets interesting, if I change the query to a LIKE statement instead of an equals it returns the correct result.
I have checked, both tables have the same setup for the listing_key fields (varchar(80), utf8_general_ci). Both tables are also MyISAM tables.
I have no idea why I am being forced to query table 2 using a LIKE operator instead of using equals.
Any ideas or thoughts?