--- In [email protected], "bab8680" <[EMAIL PROTECTED]> wrote: > > 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."
Ahhh... I missed that part. My eyes tend to glaze over when reading any form of technical documentation. :-) > 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? Well, I'm not entirely sure that would work. Here's the situation: COLUMN1, in my case, is CATEGORY, where there are 4 possible choices. COLUMN2 is SUBCATEGORY, where there are as many as 100 (divided amongst the 4 categories). So, a product can exist in up to 4 categories, and in as many subcategories as we want to put them in. Obviously, if it's in Category 1 and Category 4, then the Subcategories have to be ones that are native to Cat 1 or Cat 4. A typical product row might look like this: ID CAT SUB NAME DESCRIPTION -------------------------------------- 1 1 23 Foo Blah blah blah In this case, no worries. But if: ID CAT SUB NAME DESCRIPTION -------------------------------------- 1 1,4 23,32 Foo Blah blah blah 2 1 7,21 Bar Blah blee bloo and my HTML link is: <a href="list.php?cat=1&sub=2">Gettem!</a> then my SQL is: SELECT * FROM products WHERE CAT LIKE '%1%' and SUB LIKE '%2%' I'll end up with both products where I might not want either. In this case, the query was looking for CAT=1 and SUB=2 ... I dunno... I just think if there were some way to do it in the query, it would save 100 lines of code and more than a few additional headaches. (Nevermind the one I already have... *grin*) 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/
