with this sample dataset
I have this query
SELECT products.id,
products.title AS product_title,
products.code,
products.created,
products.modified,
products.active,
attributes.title AS attr_title,
attribute_entries.title AS attr_entry_title
FROM products
INNER JOIN attributes ON attributes.model_id = products.id
INNER JOIN attribute_entries ON attribute_entries.FK_attribute_id = attributes.id WHERE ( products.id LIKE '%" . $model['value'] . "%' OR products.code LIKE '%" . $model['value'] . "%' OR products.title LIKE '%" . $model['value'] . "%') limit 10
For some reason I get duplicates in my result set. I have done this type of query before but I never got duplicates. Although this is the first time I query the id as well and treat it as string. Is this my problem?