Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7882567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:18:59+00:00 2026-06-03T04:18:59+00:00

When I execute this query with MATCH AGAINST using MySql ( see Query 1st

  • 0

When I execute this query with MATCH AGAINST using MySql (see Query 1st) the issue in this query they has generated an error like this (see error) or when I execute the same query with = they executed normally(see Query 2nd).

My question is what am I doing wrong with against statement?

Query 1st

SELECT (SELECT COUNT(up.`user_id`) 
FROM `users_post` up WHERE MATCH (up.`user_id`) AGAINST (uf.`user_id`)) 
AS user_count 
FROM `users` uf

Error

enter code hereError Code : 1210
Incorrect arguments to AGAINST
(0 ms taken)

Update

Query 2nd

SELECT 
(SELECT COUNT(up.`user_id`) 
FROM `users_post` up WHERE up.`user_id` = uf.`user_id`) 
AS user_count 
FROM `users` uf
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:19:00+00:00Added an answer on June 3, 2026 at 4:19 am

    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
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using PDO to execute a MATCH AGAINST query. The following returns nothing: SELECT
I keep getting this error when I tried to execute this query, although I
I have a specific DB2 query, and I would like to execute this query
I've been trying to execute this mysql query in my php file however I
I want to execute a query like this var result = from entry in
I'm trying to execute a query with the Tornado's database wrapper , like this
I think this is an escaping issue or something. When I execute the query
Actually i am using the AsyncCalls library to execute an Query asynchronously in this
I want to execute a query where I match a column name using a
When I execute this query: Dim Var Var = ("select max(Autonumber) from tblAutonumber") DoCmd.RunSQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.