Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2010
    Posts
    3

    Unanswered: embedded MATCH request

    Hi !

    Topics of my forum link to a page of my annuary thanks to a MATCH request that work fine :
    Code:
    SELECT annuary_cat_id, annuary_cat_name
                  FROM annuary_categories
                  WHERE MATCH (annuary_cat_name,annuary_cat_text) AGAINST ("$forum_topic_title")
    Inversely, I want that page of the annuary can list the forum topics which point towards that page of the annuary. But I have problems to find the good request. I tried :
    Code:
    SELECT topic_id, topic_title, annuary_cat_id, annuary_cat_name, annuary_cat_text
                FROM forum_topics, annuary_categories
                WHERE annuary_cat_id = "105"
                AND topic_id=(SELECT topic_id FROM forum_topics WHERE MATCH (annuary_cat_name,annuary_cat_texte) AGAINST (topic_title) LIMIT 0,1)
    phpmyadmin (MySQL version 5.0.51a) says : "Incorrect arguments to AGAINST"

    How can I do ?
    Last edited by titiplanti; 09-22-10 at 09:59.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so are there any differences between the two statements?
    whats differe3nt between the one that works and the one that doesn't work?
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Sep 2010
    Posts
    3
    1st : AGAINST("$php_variable")
    2nd : AGAINST(SQL field)

    MySQL may not accept SQL fiel in AGAINST request. So, is there a manner to make what I want ? Any other manner ?

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    is your column called annuary_cat_texte or annuary_cat_text?
    also check your syntax, Im not convinced you can match against columns, the against I think has to be an expression not a column
    MySQL :: MySQL 5.1 Reference Manual :: 11.9 Full-Text Search Functions
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Sep 2010
    Posts
    3
    annuary_cat_text (initial post edited)

    Thank you for the link :
    The search string must be a literal string, not a variable or a column name.
    ... then we are sure !

    Can you suggest me another manner to list the topics ?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •