RE: How do I find products when a user types freeform strings like 'Sony 20 TV' or '20 Sony TV'? [SOLVED]

2007-05-10 Thread Daevid Vincent
-Original Message- From: Daevid Vincent [mailto:[EMAIL PROTECTED] Sent: Friday, May 04, 2007 1:22 AM To: mysql@lists.mysql.com Subject: How do I find products when a user types freeform strings like 'Sony 20 TV' or '20 Sony TV'? I'm having trouble figuring out the logic/query I

Re: How do I find products when a user types freeform strings like 'Sony 20 TV' or '20 Sony TV'?

2007-05-09 Thread Iain Alexander
On 4 May 2007 at 1:21, Daevid Vincent wrote: I'm having trouble figuring out the logic/query I want. I know that all those ORs are not right. [snip] WHERE products.enabled = 1 AND( (products.model LIKE 'sony%' OR products.model LIKE '20%' OR products.model LIKE 'tv%')

RE: How do I find products when a user types freeform strings like 'Sony 20 TV' or '20 Sony TV'?

2007-05-09 Thread Daevid Vincent
-Original Message- From: Iain Alexander [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 09, 2007 3:11 PM To: mysql@lists.mysql.com Subject: Re: How do I find products when a user types freeform strings like 'Sony 20 TV' or '20 Sony TV'? On 4 May 2007 at 1:21, Daevid Vincent wrote

Re: How do I find products when a user types freeform strings like 'Sony 20 TV' or '20 Sony TV'?

2007-05-07 Thread Mayssam Sayyadian
Daevid, It occurs to me that what you were explaining was multi-column keyword search which MySQL does not support as of now. You may even face scenarios where you need multi-table and multi-column keyword search (even in your example, this may come up). In brief, you have a set of keywords and

Re: How do I find products when a user types freeform strings like 'Sony 20 TV' or '20 Sony TV'?

2007-05-04 Thread Mogens Melander
On Fri, May 4, 2007 10:21, Daevid Vincent wrote: I'm having trouble figuring out the logic/query I want. I know that all those ORs are not right. I'm doing this in PHP and mySQL (of course), so if it can't be done with a single query, I can split it up. Here's the challenge, given a text

Re: How do I find products when a user types freeform strings like 'Sony 20 TV' or '20 Sony TV'?

2007-05-04 Thread Baron Schwartz
Hi Daevid, Daevid Vincent wrote: I'm having trouble figuring out the logic/query I want. I know that all those ORs are not right. I'm doing this in PHP and mySQL (of course), so if it can't be done with a single query, I can split it up. Here's the challenge, given a text field search box,

RE: How do I find products when a user types freeform strings like 'Sony 20 TV' or '20 Sony TV'?

2007-05-04 Thread Daevid Vincent
-Original Message- From: Baron Schwartz [mailto:[EMAIL PROTECTED] Daevid Vincent wrote: I'm having trouble figuring out the logic/query I want. I know that all those ORs are not right. I'm doing this in PHP and mySQL (of course), so if it can't be done with a single query, I

Re: How do I find products when a user types freeform strings like 'Sony 20 TV' or '20 Sony TV'?

2007-05-04 Thread Baron Schwartz
Hi Daevid, Daevid Vincent wrote: -Original Message- From: Baron Schwartz [mailto:[EMAIL PROTECTED] Daevid Vincent wrote: I'm having trouble figuring out the logic/query I want. I know that all those ORs are not right. I'm doing this in PHP and mySQL (of course), so if it can't be