On 5/3/05, Gordon Stewart <[EMAIL PROTECTED]> wrote:
> LIKE '%$SEARCHTEXT%'
> 
> Ive got the seearch working - & a variable of $SEARCHTEXT - & using the 
> above...
> 
> If I search for  678  and the actual number is in the fields - It does
> work & pick it up...
> 
> HOWEVER
> 
> If I search for LA 678  - If a field  has LA678 it WONT be picked up...
> If I search for LA 678  - If a field  has LA 678 it WILL be picked up...
> 
> Is there a MYSQL command I can use in a SELECT query, that says to
> ignore spaces ?

Though using LIKE (or ILIKE) isn't much good for large databases, you
could always change spaces into '%', so if you do a LIKE '%LA%678%',
it should pick up both fields.
Just beware using LIKE, because as the database grows, so will your search time.

-- 
Bruno Lustosa, aka Lofofora          | Email: [EMAIL PROTECTED]
Network Administrator/Web Programmer | ICQ: 1406477
Rio de Janeiro - Brazil              |


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