Hi, i would like to ask how to search the query on a 1 line string in that if found any word in the field will be display the result. for ex.
so this is what i want to do, if my i query a on the reaction table checking whether any values on the reaction field match on the string will return the field value.
if i query this $sql ="SELECT * FROM REACTTABLE WHERE reactact field like ='$string'"
something like that but i want to show ouput the return field match which is cat
Is there anyone can help me thanks a lot
| Code: |
|
$String = "The quick brown fox jumped over the lazy cat! lolz"; #Then let say i have data in the fields Reaction #Reaction Field Data # 1. dog # 2. zebra # 3. monkey # 4. cat # 5. goat |
so this is what i want to do, if my i query a on the reaction table checking whether any values on the reaction field match on the string will return the field value.
if i query this $sql ="SELECT * FROM REACTTABLE WHERE reactact field like ='$string'"
something like that but i want to show ouput the return field match which is cat
Is there anyone can help me thanks a lot
