Public Voice Network
- blog 3026430264
- FMT 112108 2828
- thread killer 22012201
- Ignore button please. 2424
- New Bond "Quantum of… 7272
- For a better tomorrow 1919
- EC: Joe Wigdahl 2626
- Dream Cars Videos 99
- Wanda Sykes munches rug 2929
- Batesoling was fun 1010
- No Vocode 2525
- What are you listening to… 887887
- Canned Food Drive 22
- Australia! 2424
- Pic of the Day 1017810178
- Baby P's Parents/Kill… 5959
- Friday, fuck yeah 99
- the painful truth... 66
- ODB Interview 33
- How much % of visitors to… 2828
- Politics 48814881
- my identity is loading... 55
- Blackberry Storm Line 1010
- Volume One 1010
MySQL question 1515 Responses
Last post: 5 months, 3 weeks ago | Thread started: Jun 2, 08, 12:28 p.m.
- cosmoo
mysql guru's,
Having some issue with full text searching, both statements are listed below. I need to compare two columns on separate tables. At the moment I can only compare one column at a time, when i enter statement #2 I get a mysql error. Both "tags" column are full text enabled. Can I not compare two tables using full text? Help!
Statement #1 - Working Statement:
SELECT * FROM blog_post, article WHERE blog_post.id = '8' AND MATCH(article.tags) AGAINST ('relationships')
Statement #2 - invalid statement
SELECT * FROM blog_post, article WHERE blog_post.id = '8' AND MATCH(blog_post.tags,article.tag… AGAINST ('work')
Error: #1210 - Incorrect arguments to MATCH
- Jun 2, 08, 12:28 p.m. – Permalink
- philipdrumman


- Dog-earJun 2, 08, 12:33 p.m. – Permalink
- flavorful
SELECT
blog_post.*,
article.*
FROM
blog_post WITH(NOLOCK)
INNER JOIN article WITH(NOLOCK)
ON blog_post.tags = articles.tags
WHERE
blog_post.id = 8
AND
MATCH(blog_post.tags, article.tags) AGAINST ('work')---
Is tags a Unique ID, because if there really isn't any correlation to these tables in conjunction with that field you will have to run two seperate queries I imagine using a UNION and/or find a way to match them up.

- Dog-earJun 2, 08, 12:43 p.m. – Permalink
- acescence
oh, i think i misunderstand how your tables are structured.
seems to make more sense to have a global tags table, where each row is a unique tag, then posts and articles tables, then two tables that basically map a post or article id to a tag id.
but maybe too late to go restructuring your whole db, ha.


- Dog-earJun 2, 08, 12:52 p.m. – Permalink

