* Thus wrote CPT John W. Holmes ([EMAIL PROTECTED]):
> From: "Ralph Guzman" <[EMAIL PROTECTED]>
>
>
> > Is there an advantage or difference in running FIND_IN_SET() instead of
> > LIKE?
>
> Actually no, I guess there isn't. Neither one will use an index.
There will be a slight diffence in the resuls though, depending on
the term searched and the contents
id field
--- ------
1 one,two
2 fooone,footwo
3 onefoo,twofoo
>
> mysql> explain select * from test where b like '%two%';
select id from test where b like '%two%'
id
---
1
2
3
> mysql> explain select * from test where find_in_set('two',b);
select id from test where find_in_set('two',b);
id
---
1
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php