Just sit here and try to program the search for LSQL in php;
to find just one word i will do:
select word_id from word_list,
select item_id from score_list where word_id=word_id from word_list order by score DESC
(in one query :)
But i have no clue how to make sorting the query for two words
select where word_id = 1 or word_id = 2
The sort should be again score, but for every item_id with both words i should add the score.
Maybe query for:
1. where word 1 and word 2
2. where word1 or word 2
Then i limit everytime to 10, so i have maybe 20, put them in an array, make the sum of score, sort the array, spit out 10?
to find just one word i will do:
select word_id from word_list,
select item_id from score_list where word_id=word_id from word_list order by score DESC
(in one query :)
But i have no clue how to make sorting the query for two words
select where word_id = 1 or word_id = 2
The sort should be again score, but for every item_id with both words i should add the score.
Maybe query for:
1. where word 1 and word 2
2. where word1 or word 2
Then i limit everytime to 10, so i have maybe 20, put them in an array, make the sum of score, sort the array, spit out 10?