I know that there is a four character minimum on full-text searches in MySQL. From the MySQL Documentation: "Any word that is too short is ignored. The default minimum length of words that are found by full-text searches is four characters."
Could you use: SELECT * FROM tablename WHERE column1 LIKE '%1%' AND column2 LIKE '%1%' Then use PHP to weed out the numbers other that do not match? Or does it NEED to be done in your DB query? --- In [email protected], Bob Sawyer <[EMAIL PROTECTED]> wrote: > > Let's try this again... there must be some solution available. Any > assistance will be greatly appreciated. > > ID COLUMN1 COLUMN2 > -- ------- ------- > 1 1 1,3 > 2 1,2 4 > 3 2,3 1,4 > > COLUMN1 and COLUMN2 are type TEXT. > > I need a query that will select the rows where COLUMN1 contains 2 and > COLUMN2 contains 1, resulting in row 3 being selected in this example. > > I've tried setting COLUMN1 and COLUMN2 to FULLTEXT and performing a > query like: > > SELECT * FROM tablename WHERE MATCH (COLUMN1) against (2) > > but got a zero result. > > Any "LIKE '2'" query would work, except in cases where COLUMN1 or > COLUMN2 contains a number like '21' or '42', in which case the match > would occur, but the product would display where it shouldn't. > > Is there any hope for this query? > > Thanks, > -Bob > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > Community email addresses: Post message: [email protected] Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
