OK, here's a fairly standard, non-Oracle question for you all. A friend
of mine has asked me to open up his part-search script a little bit by
making it so that if someone searches for a part number 'cp7940'
they'll get matching results that include dashes, such as 'cp-7940'.

I've already altered his script (this is MySQL now, by the way) so that
it's only searching on the first three characters of whatever someone
enters. So if they enter 'cp7940' into the search field, they'll get
anything matching 'cp7%' but that doesn't take the dashes into
consideration. I don't want to remove all dashes from the database, as
that will mess up the inventory system. 

SO - how do I get a search term that does NOT contain dashes to bring
forth search results that DO contain dashes? The only thing I could
think of was to do the old 'temporary table' thing again and strip out
all dashes as each part was written to the temp table. However, he has
several hundred thousand parts in his database, so I really don't want
to even think about the server load that would cause.

Ideas?

Thanks,
-bob


                
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 


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/
 



Reply via email to