|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello All:
I have a field obtained from MySQL database, call that as $field[i] (one for each row). I want to find if two words, say $a, $b are present in this $field[i] or not. Right now, I am checking this inclusion using substr() function and a logical AND operation. I wonder if there is a faster way to check this inclusion? Best regards, Animesh |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Animesh K wrote:
> Right now, I am checking this inclusion using substr() function and a > logical AND operation. I wonder if there is a faster way to check this > inclusion? Use fulltext indexes on the MySQL DB. Check the MySQL manual for details on doing so. -- ---------------------------------- Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org- The solution of this problem is trivial and is left as an exercise for the reader. -- Standard textbook |
|
![]() |
| Outils de la discussion | |
|
|