Home > database >  Full-text index (Err), 1210 - Incorrect the arguments to AGAINST
Full-text index (Err), 1210 - Incorrect the arguments to AGAINST

Time:09-30

Code:
SELECT
U.i d,
U.l oginName NAME,
U.m emberType type,
U.f anDian AS fan,

(
SELECT
Ifnull (sum (arjun oney), 0)
The FROM
Emep_Account a
WHERE
A.t ype IN (2, 8)
AND the MATCH (Amy polumbo arents) AGAINST (u.i d)
FanDian)
The FROM
Emep_user u
WHERE
U.i d=80182
The OR u.p arentId=80182

The above code if the MATCH (Amy polumbo arents) AGAINST (u.i d) u.i d for '80182' can perform, otherwise an error (Err), 1210 - Incorrect the arguments to AGAINST

CodePudding user response:

AGAINST () function of the parameters need to stay the same throughout the query evaluation string constants

CodePudding user response:

If is variable no way??

CodePudding user response:

reference 1st floor ZJCXC response:
AGAINST () function of the parameters for the query evaluation remains constant during the period of string constants


This is before I use like but like good slow queries, so want to change with this, are there any other better way???

CodePudding user response:

reference 1st floor ZJCXC response:
AGAINST () function of the parameters for the query evaluation remains constant during the period of string constants


It can through what way can put him into a static check again, can through stored procedures?

CodePudding user response:

In view of the statement you give, write a function can
 create function f_test text (id) 
Returns a decimal (18, 2)
Return (
SELECT
IFNULL (SUM (arjun oney), 0)
The FROM
Emep_Account a
WHERE
A.t ype IN (2, 8)
AND the MATCH (Amy polumbo arents) AGAINST (id)
);

SELECT
U.i d,
U.l oginName NAME,
U.m emberType type,
U.f anDian AS fan,
The fanDian f_test u.i (d)
The FROM
Emep_user u
WHERE
U.i d=80182 OR u.p arentId=80182
  • Related