2
假設我們有三個表:使用MVA在獅身人面像的屬性
- pr_brand(ID,標題)
- pr_brand_usages(ID,pr_brand_id,pr_usages_id)
- pr_usages(ID,標題)
在sphinx.conf
文件的查詢是:
SELECT p.id,p.title as title
FROM pr_brand p
LEFT JOIN pr_brand_usages u ON u.pr_brand_id = u.id
sql_attr_string = title
sql_attr_multi = uint pr_usages_ids from query; SELECT id,title from pr_usages
我得到pr_usages_ids = 0(無)當我運行我的查詢在控制檯:
我的查詢:
select * from my_index;
我們有多項選擇(this page)一個方面。
你能幫我解決這個問題嗎?
更新:
我sphinx.conf
文件改變了查詢:
SELECT p.id,p.title as title
FROM pr_brand p
LEFT JOIN pr_brand_usages U ON u.pr_brand_id = u.id
sql_attr_string = title
sql_attr_multi = uint pr_usages_ids from query; SELECT pr_brand_id,pr_brand_usages_id from pr_brand_usages
sql_attr_multi = uint來自查詢的pr_usages_ids; SELECT id,標題從
它是正確的嗎?
是的你是對的,但我怎樣才能得到標題字段(pr_usages)? – navid