Nous rencontrons souvent plusieurs mots clés dans le développement Web d'un seul champ. Bien sûr, plusieurs mots clés sont généralement utilisés dans l'espace ou séparés.
Code du programme:
Ce qui suit est le contenu de référence:
'Rechercher des mots clés
Str = select * from tableename où id> 4
Si srhkey <> alors
Keyarr = Split (srhkey,)
J = Ubound (Keyarr)
T = 0
Dim keystrarr ()
pour i = 0 à j
Si Keyr (i) <> alors
Redim Preserve Keystrarr (T)
StrFilter = (empzw like '% & keyarr (i) &%' ou empdep comme '% & keyarr (i) &%' ou empgz comme '%
StrFilter = strfilter & keyarr (i) &% 'ou empwy1 comme'% & keyarr (i) &% 'ou empwy2 comme'% & keyarr (i)
Strfilter = strfilter &% 'ou empyq comme'% & keyarr (i) &% 'ou com_name comme'% & keyarr (i) &%)
Keystrarrrrrrrrrrrrr (t) = strfilter
t = t + 1
terminer si
suivant
Keystr = join (keystrarrrrrrrrrrrrrdish)
Str = str & & & keystr
terminer si