Answer the question
In order to leave comments, you need to log in
How to search in Sphinx in one table, and take data from another?
Good afternoon, I read various examples and could not figure it out.
I have one table like this:
product_values
product_id | name | values
-------------------------------------------------------------------------------
1 | Product One | soft touch plastic, big screen
2 | Product Two | small screen, metal
3 | Product Three | plastic, 5" screen, 4G
product_id | category_name | color | other_values
--------------------------------------------------------------------------------
1 | phone | black | exclusive, vip, gold
1 | mobile | red | exclusive, vip, silver
1 | telecom | gold | vip, gold, powerfull
2 | phone | black | dark,cheap, etc.
2 | telecom | red | for girls, vip, exclusive
sql_query = SELECT product_values.name, product_values.values, \
product_full.category_name, product_full.color, product_full.other_values \
FROM product_values \
INNER JOIN product_full ON (product_full.product_id=product_values.product_id);
А при поиске указывать ... MATCH('@name Product @values screen')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question