subquery (Incorrect arguments to AGAINST) using Mysql

后端 未结 1 793
眼角桃花
眼角桃花 2021-01-19 16:08

When I execute this query with MATCH AGAINST using MySql (see Query 1st) the issue in this query they has generated an error lik

相关标签:
1条回答
  • 2021-01-19 17:04

    The problem is that the argument for AGAINST must be a literal string, for example 'Fred'. It is not allowed to use a column name like uf.user_id.

    MATCH (up.`user_id`) AGAINST (uf.`user_id`)
    --                            ^^^^^^^^^^^^ not allowed!
    

    From the documentation:

    The search string must be a literal string, not a variable or a column name.

    You probably need to use LIKE instead of MATCH, though you should note that it will be much slower.

    0 讨论(0)
提交回复
热议问题