I am looking for the most efficient way to do the following.
I have "table1" with the following columns, ID SavedSearch Price NewLowerPrice
what i need to do is select id and price from table 1, and flag new lower price if the boolean search against another table has a new lower min price for every saved search by the user. here is some code I am using, but i am stuck as to how to use table1's saved search in the following boolean search
drop temporary table if exists tmp;
CREATE TEMPORARY TABLE tmp(
ID INT,
Param2 Varchar(300),
LowestPrice decimal(10,2),
LowerPrice bit,
PRIMARY KEY(ID)) ENGINE=MEMORY;
INSERT INTO tmp
SELECT id, Param2, LowestPrice, 0
FROM saved_searches
where user = 28;
UPDATE tmp
set LowerPrice = 1
WHERE (
SELECT MIN(price)
FROM store_sales
WHERE MATCH (description) AGAINST (concat('\'', tmp.Param2, '\'') IN BOOLEAN MODE)) > 0;
it errors out in the update saying "incorrect arguments to AGAINST." thanks in advance!