Public Voice Network
- Medium Format 109109
- Politics 22062206
- Eminem meets the Sopranos 1111
- Gerard 77
- NYC drinks? 1111
- 'S in a logo 2727
- Pic of the Day 88388838
- Anyone with 17" MBP 2626
- blog 2745827458
- Leica M6 vs M7 2121
- logo critique? 4040
- EC: FullScream!!! 99
- St. Petersburg/Tampa FL 1414
- Corporate Naming Q 33
- PickUp Artist 2 1616
- Hello 2727
- Living off Cafepress 77
- print related blogs 1212
- originality 3030
- economy & banks 3838
- Janneman 55
- Bedrock Records (UK) 22
- Janne 1616
- iPhone/Touch apps? 2121
MySQL question 1515 Responses
Last post: 4 months, 1 week 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

