Search code examples
mysqlsqlfull-text-searchmatch-against

Fulltext search against column value?


I've read this:

MySQL Fulltext search against column value?

but it is absurd, i don't understand why it is not possible doing this.

anyone knowing some workaround?

thanks


Solution

  • This is my old procedure, try something like this in your case too-

    BEGIN
      declare done default 0;
      declare csv1 varchar(100);
      declare cur1 cursor for select csv from table; 
      DECLARE CONTINUE HANDLER FOR NOT FOUND SET done=1;
      open cur1;
      repeat
      fetch cur1 into csv1;
      -
      -
      -
      -
      update company set (something) where match(csv) against(concat("'",csv1,"'"));
      until  done end repeat;
      -
      -
      close cur1;
      select * from table;
    END