If I have a field named : fruits with the following record: apple, banana, mango, melon How can do a query / loop to extract individual fruit? And a query that will search a fruit, let say I just want to search if mango exist. Thanks
whats the table name fruits or something else? whats the field name? suppose the field name is fruits then select fruits from tablename ( would be for all the of them) select fruits from tablename where fruits = mango ( for the mango ) those are assuming you dont need anything else from the table other then the fruit name?
Sorry for the confusion but apple, banana, mango, melon is just a single record (meaning 1 record could have many fruit name) So my question is how can I search for the all records (rows) with mango in it?
I need and exact match. If I have a record apple, banana, mango, watermelon It will return true because it will see the watermelon. What I need is the function (or whatever) that will "segregate" the fruits and then see if there is an exact match.
$Indfruit=explode(",",$fruits) for($i=1; $i < sizeof($Indfruit); $i++) { if ($Indfruit == "mango") break; }